delayed_job icon indicating copy to clipboard operation
delayed_job copied to clipboard

Provide ability to add signals that may stop the job.

Open mohitnatoo opened this issue 8 years ago • 4 comments

  • Converted raise_signal_exceptions class attribute accessor to raise_exceptions_for_signals.
  • This, by default will be a blank array that is similar to having raise_signal_exceptions = false.
  • Since there is a specific check for :term signal, change has been made to raise exception if raise_exceptions_for_signals array has the signal code.
  • Also, currently only INT and TERM signals are considered. Added change to provide ability of adding more signals (like 'QUIT'), whose receipt can end the job.
  • Made sure that we have INT and TERM signals always considered.

mohitnatoo avatar Apr 01 '16 16:04 mohitnatoo

Coverage Status

Coverage increased (+0.2%) to 91.324% when pulling 67c1e5320ec8c4c882b416bb77f61bac6e58453f on mohitnatoo:812-signal-handling into 401f43e076c25559ec65fdfa611a0d94b7b29eb1 on collectiveidea:master.

coveralls avatar Apr 01 '16 16:04 coveralls

Coverage Status

Coverage increased (+0.2%) to 91.324% when pulling 910e5bd984b8ebc030737a3881fd8439ea1b34d0 on mohitnatoo:812-signal-handling into 401f43e076c25559ec65fdfa611a0d94b7b29eb1 on collectiveidea:master.

coveralls avatar Apr 01 '16 16:04 coveralls

Coverage Status

Coverage increased (+0.2%) to 91.324% when pulling c4b52ae1864e1bf2e8a90c9be5837578d9b512de on mohitnatoo:812-signal-handling into 401f43e076c25559ec65fdfa611a0d94b7b29eb1 on collectiveidea:master.

coveralls avatar Apr 01 '16 16:04 coveralls

@albus522 Any chance to merge this? Would be very helpful for as we'd like to react on QUIT signals.

johha avatar Feb 07 '23 14:02 johha