mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Cleanup
This commit is contained in:
parent
c4fc7fd806
commit
4cc5514755
2 changed files with 5 additions and 5 deletions
|
@ -67,7 +67,7 @@ module Sidekiq
|
|||
conn.multi do
|
||||
conn.sadd('workers', self)
|
||||
conn.setex("worker:#{self}:started", EXPIRY, Time.now.to_s)
|
||||
hash = {:queue => queue, :payload => msg, :run_at => Time.now.strftime("%Y/%m/%d %H:%M:%S %Z")}
|
||||
hash = {:queue => queue, :payload => msg, :run_at => Time.now.to_i }
|
||||
conn.setex("worker:#{self}", EXPIRY, Sidekiq.dump_json(hash))
|
||||
end
|
||||
end
|
||||
|
@ -106,9 +106,5 @@ module Sidekiq
|
|||
SINGLETON_CLASSES.include?(val.class) ? val : val.clone
|
||||
end
|
||||
end
|
||||
|
||||
def hostname
|
||||
@h ||= Socket.gethostname
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,5 +37,9 @@ module Sidekiq
|
|||
def process_id
|
||||
Process.pid
|
||||
end
|
||||
|
||||
def hostname
|
||||
Socket.gethostname
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue