Skip to content

Instantly share code, notes, and snippets.

@jamesdabbs
Last active December 19, 2015 00:29
Show Gist options
  • Save jamesdabbs/5868998 to your computer and use it in GitHub Desktop.
Save jamesdabbs/5868998 to your computer and use it in GitHub Desktop.
A sample job for testing out "kill a bad resque job" logic.
# 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