Sha256: 026fdc129a69d68c32b5e3fb5ddf21d8cd41e2dc8e73c3fc3b6f71011ab934a8
Contents?: true
Size: 613 Bytes
Versions: 8
Compression:
Stored size: 613 Bytes
Contents
module QueueClassicMatchers class TestWorker < QC::Worker def initialize(options) @klasses = options.delete(:klasses) super(options) end def handle_failure(job, e) raise e end def process(queue, job) # Skip over task not matching klasses k = job[:method].split('.').first if @klasses.nil? || klasses.include?(k) super else # Uncomment for debugging # puts "Skipping #{job[:method]}. Klassed: #{klasses.inspect}" queue.delete(job[:id]) end end def klasses @klasses.map(&:to_s) end end end
Version data entries
8 entries across 8 versions & 1 rubygems