mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
Remove unnecessary linking
This commit is contained in:
parent
fc8352027c
commit
aa1d919637
1 changed files with 0 additions and 15 deletions
|
@ -7,15 +7,7 @@ module Sidetiq
|
||||||
|
|
||||||
def initialize(*args, &block)
|
def initialize(*args, &block)
|
||||||
log_call "initialize"
|
log_call "initialize"
|
||||||
|
|
||||||
super
|
super
|
||||||
|
|
||||||
# Link to Sidekiq::Manager when running in server-mode. In most
|
|
||||||
# cases the supervisor is booted before Sidekiq has launched
|
|
||||||
# fully, so defer this.
|
|
||||||
if Sidekiq.server?
|
|
||||||
after(0.1) { link_to_sidekiq_manager }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -24,13 +16,6 @@ module Sidetiq
|
||||||
log_call "shutting down ..."
|
log_call "shutting down ..."
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_sidekiq_manager
|
|
||||||
Sidekiq::CLI.instance.launcher.manager.link(current_actor)
|
|
||||||
rescue NoMethodError
|
|
||||||
debug "Can't link #{self.class.name}. Sidekiq::Manager not running. Retrying in 5 seconds ..."
|
|
||||||
after(5) { link_to_sidekiq_manager }
|
|
||||||
end
|
|
||||||
|
|
||||||
def log_call(call)
|
def log_call(call)
|
||||||
info "#{self.class.name} id: #{object_id} #{call}"
|
info "#{self.class.name} id: #{object_id} #{call}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue