File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -125,16 +125,20 @@ function setGameCode(site, code) {
125125S . onLoad ( function ( ) {
126126 S . forEach ( [ "otrio" ] , function ( site ) {
127127 M . server . list ( "^websites/games/" + site + "/game codes/" , { maxDepth : 1 , hybridCutoff : 3 } ) . then ( function ( codes ) {
128+ console . log ( codes ) ;
128129 let activeGames = [ ] ;
129130 let updatedTimes = { } ;
130131 S . forEach ( codes , function ( code ) {
131132 activeGames . push ( M . server . recall ( "^websites/games/" + site + "/game codes/" + code + "lastUpdated" , { hybridCutoff : 3 } ) . then ( function ( time ) {
133+ console . log ( time ) ;
132134 updatedTimes [ code ] = time ;
133135 } ) ) ;
134136 } ) ;
135137 Promise . all ( activeGames ) . then ( function ( ) { // once all the last updated times have been retrieved
138+ console . log ( "retrieved all times" ) ;
136139 let now = new Date ( ) . getTime ( ) ;
137140 S . forEach ( updatedTimes , function ( time , code ) {
141+ console . log ( now - time ) ;
138142 if ( now - time > 172800000 ) { // if the game hasn't been played in the last 48 hours
139143 M . server . forget ( "^websites/games/" + site + "/game codes/" + code , { hybridCutoff : 3 } ) ;
140144 }
You can’t perform that action at this time.
0 commit comments