aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-08-01 16:09:16 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2016-08-01 16:09:16 -0700
commit08a92d47b08b25356b8bfea31c91ceb68cfae3ee (patch)
treec3f80b0d46c635af21efedd5ce01542e4e6fb1ee /activejob/test/jobs
parenta4fc7dc9577cb6476d8f11682cb5b853149c23fc (diff)
downloadrails-08a92d47b08b25356b8bfea31c91ceb68cfae3ee.tar.gz
rails-08a92d47b08b25356b8bfea31c91ceb68cfae3ee.tar.bz2
rails-08a92d47b08b25356b8bfea31c91ceb68cfae3ee.zip
Use descriptive exception names
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/retry_job.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb
index 2e05f95bf6..91be37f106 100644
--- a/activejob/test/jobs/retry_job.rb
+++ b/activejob/test/jobs/retry_job.rb
@@ -1,14 +1,14 @@
require_relative '../support/job_buffer'
require 'active_support/core_ext/integer/inflections'
-class SeriousError < StandardError; end
-class VerySeriousError < StandardError; end
-class NotSeriousError < StandardError; end
+class DefaultsError < StandardError; end
+class ShortWaitTenAttemptsError < StandardError; end
+class DiscardableError < StandardError; end
class RetryJob < ActiveJob::Base
- retry_on SeriousError
- retry_on VerySeriousError, wait: 1.second, attempts: 10
- discard_on NotSeriousError
+ retry_on DefaultsError
+ retry_on ShortWaitTenAttemptsError, wait: 1.second, attempts: 10
+ discard_on DiscardableError
def perform(raising, attempts)
if executions < attempts