timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.07k stars 157 forks source link

Backoff until maximum `retryDelay`? #340

Closed adamhamlin closed 2 years ago

adamhamlin commented 2 years ago

Curious if there's an idiomatic way to handle this kind of use case:

I know that I could just implement the retry/backoff in my job handler, but is there a better way? Maybe using the onComplete callback to orchestrate? Or something else I'm overlooking?

Thanks for your time.

timgit commented 2 years ago

Yes, I would recommend using onComplete for this.

adamhamlin commented 2 years ago

Thanks