1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
Commit graph

27 commits

Author SHA1 Message Date
Mike Perham
67daa7a408
Prepare for upcoming Sidekiq::Config redesign (#5340)
* Prepare for upcoming Sidekiq::Config redesign

Adjust the server internals to use a config object rather than refering directly to the Sidekiq module.
2022-05-31 13:37:31 -07:00
Mike Perham
e7d154eeb5 Remove "worker" from codebase where possible 2022-03-03 12:37:25 -08:00
Mike Perham
615393d794 RDoc improvements 2021-12-09 13:06:29 -08:00
Mike Perham
3575ccb44c Reduce retry jitter, add jitter to sidekiq_retry_in, closes #4957 2021-08-09 10:48:16 -07:00
Mike Perham
9998a59b6d Bump standard, code format updates 2020-12-16 11:07:31 -08:00
Adam Mikulasev
c045946d65 send job to morgue before calling death handlers (#4363) 2019-11-06 03:42:28 -08:00
fatkodima
ce7d1661c4 Dump error backtraces as json before compressing (#4323) 2019-10-08 13:45:17 -07:00
fatkodima
60361b03a3 Refactor Processor to avoid costly json cloning (#4316) 2019-10-07 21:48:39 -07:00
fatkodima
251be7dd02 Compress jobs backtraces 2019-09-16 09:02:38 -07:00
Mike Perham
459169237d merge master 2019-04-12 09:30:48 -07:00
Mike Perham
c650e9b150
Explicitly signal that we handled an exception with a retry, fixes #4138 (#4141)
Under just the right conditions, we could lose a job:

- Job raises an error
- Retry subsystem catches error and tries to create a retry in Redis but this raises a "Redis down" exception
- Processor catches Redis exception and thinks a retry was created
- Redis comes back online just in time for the job to be acknowledged and lost

That's a very specific and rare set of steps but it can happen.

Instead have the Retry subsystem raise a specific error signaling that it created a retry.  There will be three common cases:

1. Job is successful: job is acknowledged.
2. Job fails, retry is created, Processor rescues specific error: job is acknowledged.
3. Sidekiq::Shutdown is raised: job is not acknowledged

Now there is another case:

4. Job fails, retry fails, Processor rescues Exception: job is NOT acknowledged. Sidekiq Pro's super_fetch will rescue the orphaned job at some point in the future.
2019-04-11 18:33:59 -07:00
Bryan FRIMIN
32c55e3165 Use standardrb for source styling (#4114) 2019-04-01 09:20:41 -07:00
Mike Perham
47028ef8b7 cleanup, #4089 2019-01-31 11:27:58 -08:00
Brian Sewell
23e6a5f756 Rescue StandardErrors raised from exception's message (#4089)
* Rescue standard errors raised from exception's message

* Set a default message value if it raises an error

* Update default message value

* Add comments for exception_message
2019-01-31 11:25:00 -08:00
Mike Perham
b532249554 Minimize logging in the retry subsystem, fixes #3979 2018-09-28 11:22:17 -07:00
Benjamin Dobell
43591611b2 Ensure death_handlers are called on jobs with retry: false (#3980) 2018-09-27 08:39:13 -07:00
Mike Perham
86ca02f1d9 Refactor, changes 2018-03-22 09:13:21 -07:00
Salahutdinov Dmitry
7448351d73 fix: use default when returned 0 2018-03-22 09:04:28 -07:00
Salahutdinov Dmitry
611f7cd31f Use default retry interval in sidekiq_retry_in 2018-03-22 09:04:28 -07:00
Mike Perham
967f3f34bd Add missing preamble for @krzysiek1507, #3759 2018-03-15 09:00:53 -07:00
Mike Perham
cdf6430739 rename API to death handlers for consistency 2018-01-31 10:22:22 -08:00
Mike Perham
a2db45bc0c Polish job failure notification 2018-01-15 10:39:32 -08:00
Mike Perham
32d03ecd52 Add global failure handlers, fixes #3721 2018-01-12 14:13:45 -08:00
Yuriy Naidyon
bd93f8430b Unified Job kill via Sidekiq::DeadSet#kill 2017-08-11 12:33:12 -07:00
Mike Perham
1b3f70a1e5 Move class_attribute impl into Sidekiq::Worker 2017-05-15 14:57:03 -07:00
Mike Perham
812e0f17ad Remove duplicate retry handling to due extra raise, fixes #3356 2017-02-15 11:13:10 -08:00
Mike Perham
701e06224c Rework job processing in light of Rails 5's Reloader (#3235)
* Rework job processing in light of Rails 5's Reloader, see #3221

* Ignore built gems

* Documentation, testing

* Add fallback for 'retry' value server-side, fixes #3234

* Fix job hash reporting in stats

* cleanup

* Add job for AJ testing

* Push jobs with invalid JSON immediately to Dead set, fixes #3296

* Break retry logic into global and local parts, fixes #3306

* fix heisentest
2017-01-17 14:58:08 -08:00