mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-25 10:52:28 +01:00
Add to log information about performing time
This commit is contained in:
@@ -19,7 +19,10 @@ module Crono
|
||||
def perform
|
||||
Crono.logger.info "Perform #{performer}"
|
||||
self.last_performed_at = Time.now
|
||||
Thread.new { performer.new.perform }
|
||||
Thread.new do
|
||||
performer.new.perform
|
||||
Crono.logger.info "Finished #{performer} in %.2f seconds" % (Time.now - last_performed_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user