Skip to content

Commit

Permalink
Update distribution flow logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kanshi committed Aug 16, 2023
1 parent 10a8c49 commit 720f31f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/tasks/processors/distribution-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class DistributionQueue extends WorkerHost {
case DistributionQueue.JOB_START_DISTRIBUTION:
const data: VerificationData = job.data as VerificationData
if (data != undefined) {
this.logger.log(`Starting distribution ${data.verified_at}`)
this.logger.log(`Starting distribution ${data.verified_at} with ${data.relays.length} relays`)
try {
const scoreJobs = this.distribution.groupScoreJobs({
complete: false,
Expand All @@ -56,7 +56,7 @@ export class DistributionQueue extends WorkerHost {
return false
}
} else {
this.logger.debug('Nothing to distribute, skipping flow')
this.logger.debug('Nothing to distribute, data is undefined. Skipping flow')
return false
}

Expand Down
4 changes: 2 additions & 2 deletions src/tasks/processors/tasks-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export class TasksQueue extends WorkerHost {

if (verificationData != null) {
const distribution_time = Date.now()
const currentData = Object.assign({}, verificationData, { verified_at: distribution_time })

const currentData = Object.assign(verificationData, { verified_at: distribution_time })
this.logger.log(`Running distribution ${currentData.verified_at} with ${currentData.relays.length}`)
this.tasks.distributionQueue.add(
'start-distribution',
currentData,
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/tasks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class TasksService implements OnApplicationBootstrap {
}

public async queueDistributing(
delayJob: number = 1000 * 60 * 10,
delayJob: number = 1000 * 60 * 60,
): Promise<void> {
await this.tasksQueue.add(
'run-distribution',
Expand Down

0 comments on commit 720f31f

Please sign in to comment.