README.md in sidekiq-unique-jobs-6.0.23 vs README.md in sidekiq-unique-jobs-6.0.24
- old
+ new
@@ -342,13 +342,19 @@
If you need to perform any additional work after the lock has been released you can provide an `#after_unlock` instance method. The method will be called when the lock has been unlocked. Most times this means after yield but there are two exceptions to that.
**Exception 1:** UntilExecuting unlocks and calls back before yielding.
**Exception 2:** UntilExpired expires eventually, no after_unlock hook is called.
+**NOTE:** _It is also possible to write this code as a class method._
+
```ruby
class UniqueJobWithFilterMethod
include Sidekiq::Worker
sidekiq_options lock: :while_executing,
+
+ def self.after_unlock
+ # block has yielded and lock is released
+ end
def after_unlock
# block has yielded and lock is released
end
...