Skip to content

Commit

Permalink
More verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Lezek123 committed Nov 14, 2024
1 parent 9d38f01 commit 637b877
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/services/syncProcessing/PriorityQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,14 @@ class PriorityJobQueue<
async recalculateJobsPriority({ channels }: DynamodbService) {
await this.asyncLock.acquire(this.RECALCULATE_PRIORITY_LOCK_KEY, async () => {
const jobs = await this.queue.getJobs(['prioritized'])
this.logger.verbose(`Recalculating job priorities (jobs: ${jobs.length})...`)
this.logger.verbose(
`Recalculating job priorities`,
{
prioritizedJobsCount: jobs.length,
processingCount: this.processingCount,
processingTasks: Array.from(this.processingTasks)
}
)

const jobsByChannelId = _(jobs)
.groupBy((v) => v.data.channelId)
Expand Down

0 comments on commit 637b877

Please sign in to comment.