mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Reduce object allocations, don't use unnecessary block form in hot path
This commit is contained in:
parent
cc4e6750e1
commit
75158785a7
1 changed files with 3 additions and 3 deletions
|
@ -7,11 +7,11 @@ module Sidekiq
|
|||
Sidekiq::Logging.with_context(log_context(worker, item)) do
|
||||
begin
|
||||
start = Time.now
|
||||
logger.info { "start" }
|
||||
logger.info("start".freeze)
|
||||
yield
|
||||
logger.info { "done: #{elapsed(start)} sec" }
|
||||
logger.info("done: #{elapsed(start)} sec")
|
||||
rescue Exception
|
||||
logger.info { "fail: #{elapsed(start)} sec" }
|
||||
logger.info("fail: #{elapsed(start)} sec")
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue