lib/chronicle/etl/job_log.rb in chronicle-etl-0.2.4 vs lib/chronicle/etl/job_log.rb in chronicle-etl-0.3.0

- old
+ new

@@ -48,12 +48,22 @@ def finish @finished_at = Time.now @success = true end + def error + @finished_at = Time.now + end + def job= job @job = job @job_id = job.id + end + + def duration + return unless @finished_at + + @finished_at - @started_at end # Take a JobLog's instance variables and turn them into a hash representation def serialize {