1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
This commit is contained in:
Mike Perham 2012-09-16 07:27:49 -07:00
parent c4fc7fd806
commit 4cc5514755
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -37,5 +37,9 @@ module Sidekiq
def process_id
Process.pid
end
def hostname
Socket.gethostname
end
end
end