Skip to content

Instantly share code, notes, and snippets.

View niklas's full-sized avatar

Niklas H niklas

View GitHub Profile
@niklas
niklas / gist:1344547
Created November 7, 2011 09:35 — forked from rsanheim/gist:1054078
Devise + Spork + Rails 3.1 RC4 hacks to keep User model from loading prefork
Spork.prefork do
require "rails/application"
# Prevent Devise from loading the User model super early with it's route hacks for Rails 3.1 rc4
# see also: https://github.com/sporkrb/spork/wiki/Spork.trap_method-Jujutsu
Spork.trap_method(Rails::Application, :reload_routes!)
Spork.trap_method(Rails::Application::RoutesReloader, :reload!)
# rest of your prefork here...
end
current_scheduler = scheduler(:availabilities)
def current_scheduler.handle_exception(job, exception)
Airbrake.do_the_right_thing(exception, other_params)
puts "job #{job.job_id} caught exception '#{exception}' - the Airbrake has been triggered"
end
class TaskManager
# [..]
# do you think this may work? (hoptoad_options scope)