mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
Don't try to connect to redis from client-side sidekiq.
This commit is contained in:
parent
3bd3524f4e
commit
0fd791ed2c
1 changed files with 7 additions and 5 deletions
|
@ -42,12 +42,14 @@ module Sidetiq
|
|||
schedule.set_options(options)
|
||||
|
||||
# deleting schedulable keys if schedule changed since last reccurence definition
|
||||
old_description = get_schedulable_key("schedule_description")
|
||||
if old_description != schedule.to_s
|
||||
get_schedulable_keys.map do |key|
|
||||
Sidekiq.redis_pool.with { |r| r.del(key) }
|
||||
if Sidekiq.server?
|
||||
old_description = get_schedulable_key("schedule_description")
|
||||
if old_description != schedule.to_s
|
||||
get_schedulable_keys.map do |key|
|
||||
Sidekiq.redis_pool.with { |r| r.del(key) }
|
||||
end
|
||||
set_schedulable_key("schedule_description", schedule.to_s)
|
||||
end
|
||||
set_schedulable_key("schedule_description", schedule.to_s)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue