mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-20 16:01:30 +02:00
Access to Crono::Job from performer class
This commit is contained in:
@@ -61,7 +61,9 @@ module Crono
|
||||
end
|
||||
|
||||
def perform_job
|
||||
performer.new.perform
|
||||
performer_instance = performer.new
|
||||
performer_instance.instance_variable_set(:@_crono_job, self)
|
||||
performer_instance.perform
|
||||
finished_time_sec = format('%.2f', Time.now - last_performed_at)
|
||||
rescue StandardError => e
|
||||
handle_job_fail(e, finished_time_sec)
|
||||
|
||||
Reference in New Issue
Block a user