lib/wayfarer/gc.rb in wayfarer-0.4.3 vs lib/wayfarer/gc.rb in wayfarer-0.4.4
- old
+ new
@@ -1,15 +1,14 @@
# frozen_string_literal: true
module Wayfarer
- GC = Struct.new(:job) do
+ GC = Struct.new(:task) do
def run
- task = job.task
-
return unless task.counter.decrement <= 0
+ task.metadata.job.run_callbacks(:batch)
+
task.barrier.reset!
task.counter.reset!
- job.run_callbacks(:batch)
end
end
end