lib/rocket_job/batch/statistics.rb in rocketjob-6.0.0.rc1 vs lib/rocket_job/batch/statistics.rb in rocketjob-6.0.0.rc2

- old
+ new

@@ -47,11 +47,11 @@ def inc_in_memory(key, increment) paths = key.to_s.split(".") last = paths.pop return unless last - last_target = paths.inject(in_memory) do |target, sub_key| + last_target = paths.inject(in_memory) do |target, sub_key| target.key?(sub_key) ? target[sub_key] : target[sub_key] = Hash.new(0) end last_target[last] += increment end end @@ -97,10 +97,10 @@ @rocket_job_perform_statistics = nil end # Overrides RocketJob::Batch::Logger#rocket_job_batch_log_payload def rocket_job_batch_log_payload - h = { + h = { from: aasm.from_state, to: aasm.to_state, event: aasm.current_event } h[:statistics] = statistics.dup if statistics.present? && (completed? || failed?)