Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix instance level after_unlock callback (#737)
BACKGROUND ------------------------------------------------------------- #707 introduced a regression where the instance level `after_unlock` callback is no longer being called. This was due to the change of using `item[CLASS]` instead of `worker_class` to set `job_class` in `SidekiqUniqueJobs::Middelware#call`. `item[CLASS]` is a string, where as `worker_class` can be either an instance, or the class itself. For the instance level `after_unlock` to work, we need `job_class` to be an instance of the worker. This fixes the issue by switching back to setting `job_class` to `worker_class` CHANGELOG -------------------------------------------------------------- - Use worker_class for self.job_class in Middleware#call Co-authored-by: Mikael Henriksson <[email protected]>
- Loading branch information