Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Sep 16, 2012
1 parent c4fc7fd commit 4cc5514
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions lib/sidekiq/processor.rb
Expand Up @@ -67,7 +67,7 @@ def stats(worker, msg, queue)
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
Expand Down Expand Up @@ -106,9 +106,5 @@ def cloned(ary)
SINGLETON_CLASSES.include?(val.class) ? val : val.clone
end
end

def hostname
@h ||= Socket.gethostname
end
end
end
4 changes: 4 additions & 0 deletions lib/sidekiq/util.rb
Expand Up @@ -37,5 +37,9 @@ def redis(&block)
def process_id
Process.pid
end

def hostname
Socket.gethostname
end
end
end

0 comments on commit 4cc5514

Please sign in to comment.