-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
We were looking at some strange bug where one test was weirdly affecting another - jobs enqueued in one test were seemingly trying to run in another.
As it turned out - there was a class method on the model, used for some bulk updates, which were enqueuing async jobs with after_commit {...} block.
Dev intended to run after_commit only inside of that bulk update method, but it actually was defined for the whole model, because the AR model has its own after_commit method.
Extracting that bulk method out from the AR model into a separate service solved the issue.
Probably makes sense to put some warning in the Readme about usage within AR models?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels