diff options
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r-- | activejob/test/jobs/application_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/callback_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/gid_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/hello_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/inherited_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/kwargs_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/logging_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/nested_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/overridden_logging_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/provider_jid_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/queue_adapter_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/queue_as_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/rescue_job.rb | 2 | ||||
-rw-r--r-- | activejob/test/jobs/retry_job.rb | 4 | ||||
-rw-r--r-- | activejob/test/jobs/translated_hello_job.rb | 2 |
15 files changed, 31 insertions, 1 deletions
diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb index a009ace51c..d92ffddcb5 100644 --- a/activejob/test/jobs/application_job.rb +++ b/activejob/test/jobs/application_job.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + class ApplicationJob < ActiveJob::Base end diff --git a/activejob/test/jobs/callback_job.rb b/activejob/test/jobs/callback_job.rb index ca2a8e031a..436cb55492 100644 --- a/activejob/test/jobs/callback_job.rb +++ b/activejob/test/jobs/callback_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CallbackJob < ActiveJob::Base before_perform ->(job) { job.history << "CallbackJob ran before_perform" } after_perform ->(job) { job.history << "CallbackJob ran after_perform" } diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb index c7cfa6e7a2..2136f57e05 100644 --- a/activejob/test/jobs/gid_job.rb +++ b/activejob/test/jobs/gid_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class GidJob < ActiveJob::Base diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb index 126fefae00..404df6150a 100644 --- a/activejob/test/jobs/hello_job.rb +++ b/activejob/test/jobs/hello_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class HelloJob < ActiveJob::Base diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb index 60fca66f88..14f852ed06 100644 --- a/activejob/test/jobs/inherited_job.rb +++ b/activejob/test/jobs/inherited_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "application_job" class InheritedJob < ApplicationJob diff --git a/activejob/test/jobs/kwargs_job.rb b/activejob/test/jobs/kwargs_job.rb index 9f9d809673..b86b06bada 100644 --- a/activejob/test/jobs/kwargs_job.rb +++ b/activejob/test/jobs/kwargs_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class KwargsJob < ActiveJob::Base diff --git a/activejob/test/jobs/logging_job.rb b/activejob/test/jobs/logging_job.rb index 119b32fa67..4605fa6937 100644 --- a/activejob/test/jobs/logging_job.rb +++ b/activejob/test/jobs/logging_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class LoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/nested_job.rb b/activejob/test/jobs/nested_job.rb index 21b7692cd1..aafad0dba9 100644 --- a/activejob/test/jobs/nested_job.rb +++ b/activejob/test/jobs/nested_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class NestedJob < ActiveJob::Base def perform LoggingJob.perform_later "NestedJob" diff --git a/activejob/test/jobs/overridden_logging_job.rb b/activejob/test/jobs/overridden_logging_job.rb index 2b17a65142..2ee363637d 100644 --- a/activejob/test/jobs/overridden_logging_job.rb +++ b/activejob/test/jobs/overridden_logging_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class OverriddenLoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/provider_jid_job.rb b/activejob/test/jobs/provider_jid_job.rb index 0c8ba040f5..dacd09afdc 100644 --- a/activejob/test/jobs/provider_jid_job.rb +++ b/activejob/test/jobs/provider_jid_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class ProviderJidJob < ActiveJob::Base diff --git a/activejob/test/jobs/queue_adapter_job.rb b/activejob/test/jobs/queue_adapter_job.rb index 160dfd74ec..1c31a60ba2 100644 --- a/activejob/test/jobs/queue_adapter_job.rb +++ b/activejob/test/jobs/queue_adapter_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class QueueAdapterJob < ActiveJob::Base self.queue_adapter = :inline end diff --git a/activejob/test/jobs/queue_as_job.rb b/activejob/test/jobs/queue_as_job.rb index 7dc318e736..0feee99e87 100644 --- a/activejob/test/jobs/queue_as_job.rb +++ b/activejob/test/jobs/queue_as_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class QueueAsJob < ActiveJob::Base diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb index 62add4271a..d142cec1ea 100644 --- a/activejob/test/jobs/rescue_job.rb +++ b/activejob/test/jobs/rescue_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class RescueJob < ActiveJob::Base diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb index c02febc50c..9aa99d9a21 100644 --- a/activejob/test/jobs/retry_job.rb +++ b/activejob/test/jobs/retry_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" require "active_support/core_ext/integer/inflections" @@ -15,7 +17,7 @@ class RetryJob < ActiveJob::Base retry_on ShortWaitTenAttemptsError, wait: 1.second, attempts: 10 retry_on ExponentialWaitTenAttemptsError, wait: :exponentially_longer, attempts: 10 retry_on CustomWaitTenAttemptsError, wait: ->(executions) { executions * 2 }, attempts: 10 - retry_on(CustomCatchError) { |job, exception| JobBuffer.add("Dealt with a job that failed to retry in a custom way after #{job.arguments.second} attempts") } + retry_on(CustomCatchError) { |job, exception| JobBuffer.add("Dealt with a job that failed to retry in a custom way after #{job.arguments.second} attempts. Message: #{exception.message}") } discard_on DiscardableError def perform(raising, attempts) diff --git a/activejob/test/jobs/translated_hello_job.rb b/activejob/test/jobs/translated_hello_job.rb index 56e9f147b9..a0a68b4040 100644 --- a/activejob/test/jobs/translated_hello_job.rb +++ b/activejob/test/jobs/translated_hello_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../support/job_buffer" class TranslatedHelloJob < ActiveJob::Base |