Skip to content

Commit

Permalink
feat: Mention the cooldown timer's start point in internal logs (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
AverageHelper authored Feb 14, 2024
1 parent 58c3453 commit 0b81686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- Internal logging to indicate the start of a user's submission cooldown timer.
- `.mailmap` file.

### Changed
Expand Down
8 changes: 6 additions & 2 deletions src/actions/queue/processSongRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ async function acceptSongRequest({
logger
}: SongAcceptance): Promise<void> {
logger.debug(`Began enqueuing request at ${Date.now()} from ${logUser(context.user)}`);
await pushEntryToQueue(entry, queueChannel);
logger.debug(`Enqueued request at ${Date.now()} from ${logUser(context.user)}`);
const storedEntry = await pushEntryToQueue(entry, queueChannel);
logger.debug(
`Enqueued request at ${Date.now()} from ${logUser(
context.user
)}. Cooldown timer began at ${storedEntry.sentAt.getTime()}`
);
logger.verbose(`Accepted request from user ${logUser(context.user)}.`);
logger.debug(
`Pushed new request to queue. Sending public acceptance to user ${logUser(context.user)}`
Expand Down

0 comments on commit 0b81686

Please sign in to comment.