aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/gid_job.rb2
-rw-r--r--activejob/test/jobs/hello_job.rb2
-rw-r--r--activejob/test/jobs/rescue_job.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb
index eeb34c8a87..35c2366ec4 100644
--- a/activejob/test/jobs/gid_job.rb
+++ b/activejob/test/jobs/gid_job.rb
@@ -1,6 +1,6 @@
class GidJob < ActiveJob::Base
def perform(person)
- Thread.current[:ajbuffer] << "Person with ID: #{person.id}"
+ JobBuffer.add("Person with ID: #{person.id}")
end
end
diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb
index cb067bbe69..4c6256af0d 100644
--- a/activejob/test/jobs/hello_job.rb
+++ b/activejob/test/jobs/hello_job.rb
@@ -1,5 +1,5 @@
class HelloJob < ActiveJob::Base
def perform(greeter = "David")
- Thread.current[:ajbuffer] << "#{greeter} says hello"
+ JobBuffer.add("#{greeter} says hello")
end
end
diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb
index e42de4876e..77084160d9 100644
--- a/activejob/test/jobs/rescue_job.rb
+++ b/activejob/test/jobs/rescue_job.rb
@@ -2,7 +2,7 @@ class RescueJob < ActiveJob::Base
class OtherError < StandardError; end
rescue_from(ArgumentError) do
- Thread.current[:ajbuffer] << "rescued from ArgumentError"
+ JobBuffer.add('rescued from ArgumentError')
arguments[0] = "DIFFERENT!"
retry_now
end
@@ -14,7 +14,7 @@ class RescueJob < ActiveJob::Base
when "other"
raise OtherError
else
- Thread.current[:ajbuffer] << "performed beautifully"
+ JobBuffer.add('performed beautifully')
end
end
end