Skip to content

Commit

Permalink
feat(scheduler): Add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Nov 25, 2019
1 parent f7b61db commit 6e07e71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/framework/services/Scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class SchedulerService {
});
}
};
console.log(`Scheduling timer in ${millisUntilAction} for ${action.id}`);
const timer = setTimeout(func, millisUntilAction);
this.scheduledActionTimers.set(action.id, timer);
}
Expand All @@ -75,6 +76,7 @@ export class SchedulerService {

private async scheduleScheduledActions() {
const actions = await this.client.db.getScheduledActionsForGuilds(this.client.guilds.map(g => g.id));
console.log(`Scheduling ${actions.length} actions from db`);
actions.forEach(action => this.createTimer(action));
}

Expand Down

0 comments on commit 6e07e71

Please sign in to comment.