Skip to content

Instantly share code, notes, and snippets.

@cmelbye
Created July 30, 2014 18:20
Show Gist options
  • Save cmelbye/a53d728e2f9cfc6b4f63 to your computer and use it in GitHub Desktop.
Save cmelbye/a53d728e2f9cfc6b4f63 to your computer and use it in GitHub Desktop.
class SomeJob
def self.perform(some_arg)
# do stuff
rescue Resque::TermException => e
puts "SIGTERM, retrying..."
Resque.enqueue SomeJob, some_arg
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment