SimonErm / react-native-job-queue

Easy to use react-native queuing library
https://simonerm.github.io/react-native-job-queue/
122 stars 33 forks source link

Retry Failed Job? #37

Closed myckhel closed 3 years ago

myckhel commented 3 years ago

Question

Is it possible to retry failed job?

SimonErm commented 3 years ago

Yes you can pass attempts to the job options. https://simonerm.github.io/react-native-job-queue/docs/classes/queue#addjob The attempts configure the number of retries.

myckhel commented 3 years ago

Yes you can pass attempts to the job options. https://simonerm.github.io/react-native-job-queue/docs/classes/queue#addjob The attempts configure the number of retries.

I meant manually retrying a particular job without letting it retry automatically.

SimonErm commented 3 years ago

That's not possible this way, but you could set the attempts to 0 and use the workers onFailure callback to add a new job with the same payload, which should lead to the same behaviour.

myckhel commented 3 years ago

Okay. Nice