Skip to content

Commit

Permalink
Merge pull request #164 from sotatek-dev/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Sotatek-TanHoang authored Oct 9, 2024
2 parents e3dd626 + 357b948 commit 063d436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/modules/crawler/job-unlock.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export class JobUnlockProvider {
age: this.jobRemoveDueDate,
},
backoff: this.signatureJobBackOff,
jobId: `validate-signature-${data.eventLogId}-${i}`,
},
);
}
Expand All @@ -166,7 +165,6 @@ export class JobUnlockProvider {
age: this.jobRemoveDueDate,
},
backoff: this.sendTxJobBackOff,
jobId: `send-tx-${data.eventLogId}`,
},
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/shared/modules/queue/queue.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export class QueueService {
const queue = this.initQueueOnDemand(queueName);
if (!!options.jobId) {
const canContinue = await this.removeExistedJobIfFailed(options.jobId, queue);
if (!canContinue) return false;
if (!canContinue) {
this.logger.warn('this job is existed in queue and not in failed status');
return false;
}
}
await queue.add(job, options);
return true;
Expand Down

0 comments on commit 063d436

Please sign in to comment.