Skip to content

Commit

Permalink
fix(logs): set a startup timeout, set some logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Mar 18, 2023
1 parent 935127e commit ec5943a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/eventHandlers/Ready.js
Expand Up @@ -20,9 +20,12 @@ const max = {

const cycleTimeout = 60000;

const startupTimeout = Number.parseInt(process.env.READY_FORCE || '3600000', 10);

export default class OnReadyHandle extends Handler {
constructor(bot) {
super(bot, 'handlers.onReady', Events.CLIENT_READY);
setTimeout(this.execute.bind(this), startupTimeout);
}

async execute() {
Expand All @@ -32,7 +35,7 @@ export default class OnReadyHandle extends Handler {
await this.#notifyUp();

this.settings.init();
await this.settings.ensureData(this.client);
// await this.settings.ensureData(this.client);
this.bot.readyToExecute = true;

await this.#updatePresence();
Expand Down
2 changes: 1 addition & 1 deletion src/notifications/Broadcaster.js
Expand Up @@ -54,7 +54,7 @@ export default class Broadcaster {
? this.workerCache.getKey(`${type}:${platform}:${locale}`)
: await this.settings.getAgnosticNotifications({ type, platform, items, locale });
if (!channels?.length) {
logger.error(`No channels on ${platform}:${locale} tracking ${type}... continuing`, 'WS');
logger.debug(`No channels on ${platform}:${locale} tracking ${type}... continuing`, 'WS');
return;
}

Expand Down

0 comments on commit ec5943a

Please sign in to comment.