Skip to content

Commit

Permalink
Another job board hot fix (#304)
Browse files Browse the repository at this point in the history
* A little more logging

* Break instead of trying to recover
  • Loading branch information
vcarl authored Aug 9, 2023
1 parent 5203bdb commit 038b869
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/features/jobs-moderation/job-mod-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,27 +183,26 @@ export const deleteAgedPosts = async () => {
)}`,
);
} catch (e) {
jobBoardMessageCache.shift();
logger.log(
"DEBUG",
`deleteAgedPosts() message '${constructDiscordLink(
message,
)}' not found, originally sent by ${
message.author.username
} at ${format(
message.createdAt,
"P p",
)}. Message cache has: [${jobBoardMessageCache
} at ${format(message.createdAt, "P p")}. Message cache (${
jobBoardMessageCache.length
} entries) has: [${jobBoardMessageCache
.map(
(c) =>
`${c.message.id} ${c.message.author.username} ${format(
c.message.createdAt,
"P p",
)}]`,
)}`,
)
.join(",\n")}
.join(",\n")}]
${e}`,
);
break;
}
}
};
Expand Down

0 comments on commit 038b869

Please sign in to comment.