samsondav / rihanna

Rihanna is a high performance postgres-backed job queue for Elixir
MIT License
439 stars 49 forks source link

What happens on job exit? #36

Closed vorce closed 5 years ago

vorce commented 5 years ago

Hello and thanks for this project. I am evaluating whether we should use rihanna for some job scheduling and the FAQ entry about job duration stood out to me:

One thing to be aware of is that if you restart your application (e.g. because you deployed) then all running jobs on that node will be exited. For this reason it is probably sensible not to make your jobs take an extremely long time.

Can you elaborate a little on this? What does exit mean here..? Is the job considered "done", put into some error state or requeued?

For some context: We will have jobs that can potentially take quite a long time to finish (30mins+) and use CD extensively. So any job that gets interrupted due to a deployment needs to be finished at some point (restarted).

Thanks again and have a nice day!

samsondav commented 5 years ago

If the node is killed, the advisory lock on the job will be released and the job will be automatically picked up by the next running dispatcher.

Effectively, the job is put back on the queue.

All Rihanna jobs are guaranteed to be executed at least once by design.

vorce commented 5 years ago

Oh ok, cool. That sounds good. 👍

On 7 Dec 2018, at 17:30, Sam Davies notifications@github.com wrote:

If the node is killed, the advisory lock on the job will be released and the job will be automatically picked up by the next running dispatcher.

All Rihanna jobs are guaranteed to be executed at least once by design.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.