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

Touch server_middleware to prevent lazy loading race conditions, fixes #3043

This commit is contained in:
Mike Perham 2016-06-30 11:03:10 -07:00
parent 47930f0ae5
commit 6cb7716f17

View file

@ -71,6 +71,9 @@ module Sidekiq
ver = Sidekiq.redis_info['redis_version']
raise "You are using Redis v#{ver}, Sidekiq requires Redis v2.8.0 or greater" if ver < '2.8'
# Touch middleware so it isn't lazy loaded by multiple threads, #3043
Sidekiq.server_middleware
# Before this point, the process is initializing with just the main thread.
# Starting here the process will now have multiple threads running.
fire_event(:startup)