mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Ignore Shutdown exception in retry middleware, fixes #897
This commit is contained in:
parent
7df3c51f2c
commit
541ff1f58a
2 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
2.11.3
|
2.11.3
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
- Fix unclean shutdown leading to duplicate jobs [#897]
|
||||||
- Add Korean locale [#890]
|
- Add Korean locale [#890]
|
||||||
|
|
||||||
2.11.2
|
2.11.2
|
||||||
|
|
|
@ -48,6 +48,9 @@ module Sidekiq
|
||||||
|
|
||||||
def call(worker, msg, queue)
|
def call(worker, msg, queue)
|
||||||
yield
|
yield
|
||||||
|
rescue Sidekiq::Shutdown
|
||||||
|
# ignore, will be pushed back onto queue
|
||||||
|
raise
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise e unless msg['retry']
|
raise e unless msg['retry']
|
||||||
max_retry_attempts = retry_attempts_from(msg['retry'], DEFAULT_MAX_RETRY_ATTEMPTS)
|
max_retry_attempts = retry_attempts_from(msg['retry'], DEFAULT_MAX_RETRY_ATTEMPTS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue