File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable no-promise-executor-return */
12/* eslint-disable no-await-in-loop */
23/* eslint-disable no-console */
34const { promises : fs } = require ( 'fs' )
@@ -26,7 +27,8 @@ module.exports = class EventManager {
2627 this . available . pokemon = await Db . getAvailable ( 'Pokemon' )
2728 this . available . pokestops = await Db . getAvailable ( 'Pokestop' )
2829 while ( ! this . available . pokestops . length && this . pokestopTry <= config . database . settings . availableRetryCount ) {
29- console . log ( `[EVENT] No pokestops found, trying again in 10 seconds (attempt ${ this . pokestopTry } / ${ config . database . settings . availableRetryCount } )` )
30+ console . log ( `[EVENT] No pokestops found, trying again in 1 second (attempt ${ this . pokestopTry } / ${ config . database . settings . availableRetryCount } )` )
31+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) )
3032 this . available . pokestops = await Db . getAvailable ( 'Pokestop' )
3133 this . pokestopTry += 1
3234 }
You can’t perform that action at this time.
0 commit comments