mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-15 21:22:11 +01:00
Add to log information about performing time
This commit is contained in:
1 parent
2109be7bba
commit
db6df90beb
1 file changed
+4
-1
+4
-1
@@ -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