You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connects to discussion in #417; please keep discussion in that issue. This issue is focused on implementation.
batch=GoodJob::Batch.newbatch.callback_class="MyCallBackJob"# => Results in `MyCallbackJob.perform_later(batch)`batch.callback_queue_name="default"batch.callback_priority=0batch.properties={user: current_user}# additional state that is serialized/deserialized using ActiveJob/GlobalIdbatch.adddoMyJob.perform_laterYourJob.perform_laterendmore_job=MoreJob.perform_laterbatch.add(more_job)batch.enqueue# jobs may be performed but the callback won't be triggered till `Batch#enqueue` is called# Or more succinctlyGoodJob::Batch.enqueue(on_finish: "MyCallbackJob",user: current_user)do |batch|
MyJob.perform_laterYourJob.perform_laterMoreJob.perform_laterendbatch.jobs# => All of the GoodJob::Jobs in the batchbatch.enqueued_at# => When the batch is first enqueuedbatch.discarded_at# => When the _first_ job is discardedbatch.completed_at# => When all jobs are completed successfully or discarded# When the _first_ job within the batch is discarded:# MyCallbackJob.perform_later(batch)# When _all_ jobs within the batch are completed successfully or discarded:# MyCallbackJob.perform_later(batch)
Connects to discussion in #417; please keep discussion in that issue. This issue is focused on implementation.
Work
Execution
after_perform_unlocked
callback #706The text was updated successfully, but these errors were encountered: