Last active
December 19, 2015 00:29
-
-
Save jamesdabbs/5868998 to your computer and use it in GitHub Desktop.
A sample job for testing out "kill a bad resque job" logic.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Queue this up manually with `Resque.enqueue LongJob, foo: :bar, ...` | |
# The extra opts don't do anything, but should show up in the UI | |
# | |
# You may want to fiddle around with the @queue / your resque-pool configuration | |
# for testing purposes. By default, :download is the only queue with 2 workers | |
# | |
# Also, you might want to run resque(-pool) with VERBOSE=true | |
class LongJob | |
@queue = :download | |
def self.perform opts={} | |
puts "In LongJob#perform" | |
loop {} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment