diff options
author | Jacek Lachowski <jacek.lachowski@toptal.com> | 2017-10-13 14:00:20 +0200 |
---|---|---|
committer | Jacek Lachowski <jacek.lachowski@toptal.com> | 2017-11-24 10:40:16 +0100 |
commit | b1fbb6688c9e7b1909ca3ab71691822fc32daf1c (patch) | |
tree | edac843d33ef0898c133184b17f782f0f6204fa1 /activejob/test/integration/queuing_test.rb | |
parent | a7d7277f947dcbe31870af9f03a42d56d2b60fcc (diff) | |
download | rails-b1fbb6688c9e7b1909ca3ab71691822fc32daf1c.tar.gz rails-b1fbb6688c9e7b1909ca3ab71691822fc32daf1c.tar.bz2 rails-b1fbb6688c9e7b1909ca3ab71691822fc32daf1c.zip |
Improve DelayedJob wrapper logging
ActiveJob wraps every adapter into its own class, that is later passed
into DelayedJob which is responsible for displaying all the logs.
This change improves the logging so we can easily trace executed
jobs and see meaningful information in the logs.
Diffstat (limited to 'activejob/test/integration/queuing_test.rb')
-rw-r--r-- | activejob/test/integration/queuing_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activejob/test/integration/queuing_test.rb b/activejob/test/integration/queuing_test.rb index 0d8aa336a6..32ef485c45 100644 --- a/activejob/test/integration/queuing_test.rb +++ b/activejob/test/integration/queuing_test.rb @@ -45,6 +45,13 @@ class QueuingTest < ActiveSupport::TestCase end end + test "should supply a wrapped class name to DelayedJob" do + skip unless adapter_is?(:delayed_job) + ::HelloJob.perform_later + job = Delayed::Job.first + assert_match(/HelloJob \[[0-9a-f-]+\] from DelayedJob\(default\) with arguments: \[\]/, job.name) + end + test "resque JobWrapper should have instance variable queue" do skip unless adapter_is?(:resque) job = ::HelloJob.set(wait: 5.seconds).perform_later |