Skip to content

Instantly share code, notes, and snippets.

@cj
Created November 30, 2011 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cj/db16bf6beb1a1007dcc2 to your computer and use it in GitHub Desktop.
Save cj/db16bf6beb1a1007dcc2 to your computer and use it in GitHub Desktop.
module FailedJob
def on_failure_last_retry?(e, *args)
if retry_limit_reached?
puts 'total failure'
end
end
end
class Auto::Ccc < Resque::JobWithStatus
extend Resque::Plugins::ExponentialBackoff
extend Resque::Plugins::Retry
extend FailedJob
@config= Rails.application.config.workers
@queue = :auto_queue
@backoff_strategy = @config.backoff_strategy
def self.export(assignment, wsdl_function, wrap, block, type)
# ...
end
def portal_url
# ...
end
end
class Auto::Ccc::NotesWorker < Auto::Ccc
def perform
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment