Fix message and wait time

This commit is contained in:
Anton Vakhrushev 2020-03-29 17:43:25 +03:00
parent 3905097151
commit 4eaff4e6b9
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import UpgradeBuildingTask from './Task/UpgradeBuildingTask';
import GoToBuildingAction from './Action/GoToBuildingAction';
import UpgradeBuildingAction from './Action/UpgradeBuildingAction';
import { TryLaterError } from './Errors';
import { TaskQueue, State, ImmutableState } from './Storage/TaskQueue';
import { TaskQueue, ImmutableState } from './Storage/TaskQueue';
import ActionQueue from './Storage/ActionQueue';
import { Args, Command } from './Common';
import TaskQueueRenderer from './TaskQueueRenderer';
@ -99,7 +99,7 @@ export default class Scheduler {
try {
await action.run(args);
} catch (e) {
console.warn('ACTION ERROR', e);
console.warn('ACTION ABORTED', e.message);
if (e instanceof TryLaterError) {
console.warn('TRY AFTER', e.seconds);
this.actionQueue.clear();

View File

@ -9,7 +9,7 @@ export async function sleepShort() {
}
export async function sleepLong() {
let ms = 30000 + Math.random() * 30000;
let ms = 30_000 + Math.random() * 120_000;
console.log('SLEEP LONG', Math.round(ms));
return await sleep(ms);
}