Sha256: e6b8d4cccd54e1d2e31443eeb82e96e95b47c042bdfb7da95de773f4a52aabc7
Contents?: true
Size: 462 Bytes
Versions: 19
Compression:
Stored size: 462 Bytes
Contents
# frozen_string_literal: true require 'resque' module JobIteration module Integrations module ResqueIterationExtension # @private def initialize(*) # @private $resque_worker = self super end end # The patch is required in order to call shutdown? on a Resque::Worker instance Resque::Worker.prepend(ResqueIterationExtension) JobIteration.interruption_adapter = -> { $resque_worker.try!(:shutdown?) } end end
Version data entries
19 entries across 19 versions & 1 rubygems