Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefine Batch#finished_at to mean all callback jobs have finished too; add Batch#jobs_finished_at to allow not deleting batches until all their callback jobs complete #1454

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

bensheldon
Copy link
Owner

Connects to #1387

Add logic to delete batches only after their callback jobs have completed.

@bensheldon bensheldon force-pushed the fix-batch-deletion branch 4 times, most recently from 70db1e4 to a311e1e Compare August 2, 2024 15:17
@bensheldon bensheldon marked this pull request as ready for review August 8, 2024 15:15
@@ -761,6 +762,7 @@ def reset_batch_values(&block)

def continue_discard_or_finish_batch
batch._continue_discard_or_finish(self) if batch.present?
callback_batch._continue_discard_or_finish(self) if callback_batch.present?
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't pass the job. If the job is a callback_job, it shouldn't have the ability to discard the batch.

@bensheldon bensheldon force-pushed the fix-batch-deletion branch 2 times, most recently from d6bc6ec to cb47fd2 Compare August 9, 2024 00:19
Connects to #1387

Add logic to delete batches only after their callback jobs have completed.
@bensheldon bensheldon changed the title Don't delete batches until all their callback jobs complete Add Batch#jobs_finished_at to allow not deleting batches until all their callback jobs complete Aug 29, 2024
@bensheldon bensheldon changed the title Add Batch#jobs_finished_at to allow not deleting batches until all their callback jobs complete Redefine Batch#finished_at to mean all callback jobs have finished too; add Batch#jobs_finished_at to allow not deleting batches until all their callback jobs complete Sep 14, 2024
@bensheldon bensheldon merged commit 4d443b3 into main Sep 14, 2024
10 checks passed
@bensheldon bensheldon deleted the fix-batch-deletion branch September 14, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant