Signals support: Tell DJ finish processing, then stop taking new jobs

24 views
Skip to first unread message

Pablo Cantero

unread,
Sep 11, 2018, 5:15:47 PM9/11/18
to delayed_job
Hey,

Does delayed_jobs take signals? I would love to tell DJ to finish processing the current jobs, but stop taking new ones, so I can deploy a new version of the code without abruptly `SIGTERM` stopping the current jobs being processed.  

David Genord II

unread,
Sep 11, 2018, 6:40:56 PM9/11/18
to delay...@googlegroups.com
The standard signals do that already.

David

On Tue, Sep 11, 2018 at 4:48 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hey,

Does delayed_jobs take signals? I would love to tell DJ to finish processing the current jobs, but stop taking new ones, so I can deploy a new version of the code without abruptly `SIGTERM` stopping the current jobs being processed.  

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pablo Cantero

unread,
Sep 11, 2018, 10:17:24 PM9/11/18
to delay...@googlegroups.com
Hi David,


raise_signal_exceptions is set to :term (most likely the default value). So the idea is to set it to false from preventing the Signal Exception?

My workers are currently deployed to Heroku and I don't want to abruptly terminate them, so my idea is to stop processing then deploy. 



On Tue, Sep 11, 2018 at 6:40 PM David Genord II <albu...@gmail.com> wrote:
The standard signals do that already.

David
On Tue, Sep 11, 2018 at 4:48 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hey,

Does delayed_jobs take signals? I would love to tell DJ to finish processing the current jobs, but stop taking new ones, so I can deploy a new version of the code without abruptly `SIGTERM` stopping the current jobs being processed.  

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Pablo Cantero
pablocantero.com

David Genord II

unread,
Sep 12, 2018, 8:30:13 AM9/12/18
to delay...@googlegroups.com
Yes, but be aware, Heroku is not very patient. Your process has 30 seconds to gracefully shutdown before it hard kills it.

David

On Tue, Sep 11, 2018 at 10:17 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hi David,


raise_signal_exceptions is set to :term (most likely the default value). So the idea is to set it to false from preventing the Signal Exception?

My workers are currently deployed to Heroku and I don't want to abruptly terminate them, so my idea is to stop processing then deploy. 


On Tue, Sep 11, 2018 at 6:40 PM David Genord II <albu...@gmail.com> wrote:
The standard signals do that already.

David
On Tue, Sep 11, 2018 at 4:48 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hey,

Does delayed_jobs take signals? I would love to tell DJ to finish processing the current jobs, but stop taking new ones, so I can deploy a new version of the code without abruptly `SIGTERM` stopping the current jobs being processed.  

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Pablo Cantero
pablocantero.com

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job+unsubscribe@googlegroups.com.

Pablo Cantero

unread,
Oct 9, 2018, 3:53:44 PM10/9/18
to delay...@googlegroups.com
Thanks David.

On Wed, Sep 12, 2018 at 8:30 AM David Genord II <albu...@gmail.com> wrote:
Yes, but be aware, Heroku is not very patient. Your process has 30 seconds to gracefully shutdown before it hard kills it.

David
On Tue, Sep 11, 2018 at 10:17 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hi David,


raise_signal_exceptions is set to :term (most likely the default value). So the idea is to set it to false from preventing the Signal Exception?

My workers are currently deployed to Heroku and I don't want to abruptly terminate them, so my idea is to stop processing then deploy. 


On Tue, Sep 11, 2018 at 6:40 PM David Genord II <albu...@gmail.com> wrote:
The standard signals do that already.

David
On Tue, Sep 11, 2018 at 4:48 PM, Pablo Cantero <pabl...@gmail.com> wrote:
Hey,

Does delayed_jobs take signals? I would love to tell DJ to finish processing the current jobs, but stop taking new ones, so I can deploy a new version of the code without abruptly `SIGTERM` stopping the current jobs being processed.  

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Pablo Cantero
pablocantero.com

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Pablo Cantero
pablocantero.com
Reply all
Reply to author
Forward
0 new messages