Skip to content

Commit

Permalink
Merge d245d9e into e3a6323
Browse files Browse the repository at this point in the history
  • Loading branch information
harlancleiton committed Nov 1, 2019
2 parents e3a6323 + d245d9e commit c52ac40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -59,6 +59,7 @@ class SendEmail extends Job {
this.timeOut = 50; // seconds
this.retryCount = 3;
this.retryUntil = 200; // seconds
this.delayUntil = Date.parse('2038-01-19T03:14:08.000Z') // optional, omit this line if not required
}

async handle(link, done) {
Expand Down
2 changes: 2 additions & 0 deletions src/Queue/index.js
Expand Up @@ -141,6 +141,7 @@ class Queue {
.timeout(job.timeOut || 0)
.backoff('fixed', job.retryUntil || 0)
.retries(job.retryCount || 2)
.delayUntil(job.delayUntil || 0)
.save(async (err, $job) => { // See: https://github.com/bee-queue/bee-queue/issues/147
if (err) {
console.error(`@@adonisjs/Queue: failed in creating job id=${this._jobUuid} on queue: ${_name}`)
Expand All @@ -160,6 +161,7 @@ class Queue {
.timeout(job.timeOut || 0)
.backoff('fixed', job.retryUntil || 0)
.retries(job.retryCount || 2)
.delayUntil(job.delayUntil || 0)
.save()
}
}
Expand Down

0 comments on commit c52ac40

Please sign in to comment.