Skip to content

Commit

Permalink
#none removed progress check for message updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaribsin committed May 27, 2024
1 parent 9e1ab7d commit a587970
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/handlers/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@ const SUBSCRIBE_FOOTER = config.SUBSCRIBE_FOOTER;
const DISCORD_INVITE = config.DISCORD_INVITE;
const HD_COMPANION_LINK = config.HD_COMPANION_LINK;

let isUpdateInProgress = false;

export async function updateMessages() {
if (isUpdateInProgress) {
logger.info('Update already in progress, skipping', {type: 'update'});
return;
}
isUpdateInProgress = true;

const start = Date.now();
const warStatusEmbeds = await warStatusPersistentMessage();
let {description} = warStatusEmbeds[warStatusEmbeds.length - 1].data;
Expand Down Expand Up @@ -89,7 +81,6 @@ export async function updateMessages() {

// eslint-disable-next-line node/no-unsupported-features/es-builtins
await Promise.allSettled(updatePromises);
isUpdateInProgress = false;

const taken = `${(Date.now() - start).toLocaleString()}ms`;
logger.info(
Expand Down

0 comments on commit a587970

Please sign in to comment.