lib/chaotic_job/scenario.rb in chaotic_job-0.0.1 vs lib/chaotic_job/scenario.rb in chaotic_job-0.1.0

- old
+ new

@@ -19,10 +19,15 @@ def run @job.class.retry_on RetryableError, attempts: 10, wait: 1, jitter: 0 ActiveSupport::Notifications.subscribed(->(event) { @events << event.dup }, @capture) do glitch.inject! do - block_given? ? yield : Performance.rehearse(@job) + if block_given? + yield + else + @job.enqueue + Performer.perform_all + end end end # TODO: assert that all glitches ran end