diff --git a/lib/bugsnag/resque.rb b/lib/bugsnag/resque.rb index 4ec1ba845..ff967243f 100644 --- a/lib/bugsnag/resque.rb +++ b/lib/bugsnag/resque.rb @@ -37,7 +37,14 @@ def save # Auto-load the failure backend Bugsnag::Resque.add_failure_backend -Resque.before_first_fork do - Bugsnag.configuration.app_type = "resque" - Bugsnag.configuration.default_delivery_method = :synchronous +if Resque::Worker.new.fork_per_job? + Resque.after_fork do + Bugsnag.configuration.app_type = "resque" + Bugsnag.configuration.default_delivery_method = :synchronous + end +else + Resque.before_first_fork do + Bugsnag.configuration.app_type = "resque" + Bugsnag.configuration.default_delivery_method = :synchronous + end end