mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-21 17:10:03 +01:00
Add Job#load to load info from DB
This commit is contained in:
@@ -35,6 +35,10 @@ module Crono
|
||||
model.update(last_performed_at: last_performed_at)
|
||||
end
|
||||
|
||||
def load
|
||||
self.last_performed_at = model.last_performed_at
|
||||
end
|
||||
|
||||
private
|
||||
def model
|
||||
@model ||= Crono::CronoJob.find_or_create_by(job_id: job_id)
|
||||
|
||||
Reference in New Issue
Block a user