Sha256: 627a7e172cc8e8957bce93e3e02db1197c22ddaf526f9531f615808abe45a55f
Contents?: true
Size: 570 Bytes
Versions: 3
Compression:
Stored size: 570 Bytes
Contents
# frozen_string_literal: true module SidekiqUniqueJobs module Server class Middleware include OptionsWithFallback def call(worker_class, item, queue) @worker_class = worker_class @item = item @queue = queue return yield if unique_disabled? lock.execute(after_unlock_hook) do yield end end protected attr_reader :item def after_unlock_hook -> { worker_class.after_unlock if worker_method_defined?(:after_unlock) } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems