Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix issue #382 #468

Merged
merged 1 commit into from

2 participants

@jshraibman-mdsol

There is no real way to test this in specs since spec_helper sets the logger explicitly. Existing specs all pass after the change.

@albus522 albus522 merged commit a6d7172 into collectiveidea:master

1 check failed

Details default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 15, 2013
  1. @jshraibman-mdsol

    Fix issue #382

    jshraibman-mdsol authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −0 lib/delayed/railtie.rb
  2. +0 −6 lib/delayed/worker.rb
View
6 lib/delayed/railtie.rb
@@ -7,6 +7,12 @@ class Railtie < Rails::Railtie
ActiveSupport.on_load(:action_mailer) do
ActionMailer::Base.send(:extend, Delayed::DelayMail)
end
+
+ Delayed::Worker.logger = if defined?(Rails)
+ Rails.logger
+ elsif defined?(RAILS_DEFAULT_LOGGER)
+ RAILS_DEFAULT_LOGGER
+ end
end
rake_tasks do
View
6 lib/delayed/worker.rb
@@ -47,12 +47,6 @@ def self.reset
# (perhaps to inspect the reason for the failure), set this to false.
self.destroy_failed_jobs = true
- self.logger = if defined?(Rails)
- Rails.logger
- elsif defined?(RAILS_DEFAULT_LOGGER)
- RAILS_DEFAULT_LOGGER
- end
-
def self.backend=(backend)
if backend.is_a? Symbol
require "delayed/serialization/#{backend}"
Something went wrong with that request. Please try again.