1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/test
Mike Perham 3b5862492a Remove job duplication edge case with Sidekiq Pro, fixes #3388
In #2531, we saw how an IO exception in the logger could cause a job to fail and be deleted before it reached the RetryJobs block, causing job loss.  To fix this, we disabled job acknowledgement until job execution starts but this has the bad side effect of duplicating jobs if the user is running a reliable scheme and the error happens after the RetryJobs middleware but before execution starts.

Instead we flip the middleware ordering; logging now happens within the retry block.  We would lose context-specific logging within retry so we move the context log setup out of the middleware into the Processor.  With these changes, we can properly retry and acknowledge even if there are errors within the initial server middleware and executor calls.

This code path has been reimplemented in Sidekiq 5.0 so this change only applies to 4.x.
2017-03-15 10:03:47 -07:00
..
fixtures Allow dynamic sidekiq-web locale paths, for localized extensions, fixes #1261 2013-10-21 12:07:18 -07:00
config.yml Dont use logger in options parsing, fixes #1335 2013-11-13 21:33:44 -08:00
env_based_config.yml Clean up option processing 2013-01-18 20:57:26 -08:00
fake_env.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
helper.rb Integrate Percy.io for visual regression tests (#3316) 2017-01-18 14:19:48 -08:00
test_actors.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_api.rb Safer latency calculation for incomplete jobs, fixes #3340 2017-02-02 12:25:29 -08:00
test_cli.rb Fix minitest warnings (#3300) 2017-01-02 12:06:02 -08:00
test_client.rb Fix minitest warnings (#3300) 2017-01-02 12:06:02 -08:00
test_exception_handler.rb Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
test_extensions.rb Minimize Ruby warnings in test suite 2016-11-23 14:50:11 -08:00
test_fetch.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_launcher.rb Rewrite heartbeat so we can dynamically update tags/labels, #2867 2016-11-25 13:39:22 -08:00
test_logging.rb Fix minitest warnings (#3300) 2017-01-02 12:06:02 -08:00
test_manager.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_middleware.rb Fix minitest warnings (#3300) 2017-01-02 12:06:02 -08:00
test_processor.rb Remove job duplication edge case with Sidekiq Pro, fixes #3388 2017-03-15 10:03:47 -07:00
test_rails.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_redis_connection.rb Symbolize keys in options hash for RedisConnection.create 2016-05-26 12:50:37 +07:00
test_retry.rb Put source encoding comment as line for (j)ruby 1.9 compatibility (#3255) 2016-11-22 20:39:00 -08:00
test_retry_exhausted.rb Fix minitest warnings (#3300) 2017-01-02 12:06:02 -08:00
test_scheduled.rb Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
test_scheduling.rb Fix the error in worker#perform_in about interval type (#3170) 2016-09-30 02:31:08 -07:00
test_sidekiq.rb Put source encoding comment as line for (j)ruby 1.9 compatibility (#3255) 2016-11-22 20:39:00 -08:00
test_testing.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_testing_fake.rb Add the enqueued_at attribute when fake Testing (#3258) 2016-11-25 21:19:16 -08:00
test_testing_inline.rb Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
test_util.rb Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
test_web.rb escape page and poll parameters for safety 2017-02-15 09:29:17 -08:00
test_web_auth.rb Integrate Percy.io for visual regression tests (#3316) 2017-01-18 14:19:48 -08:00
test_web_helpers.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
test_web_sessions.rb Integrate Percy.io for visual regression tests (#3316) 2017-01-18 14:19:48 -08:00