lib/maglev/active_job/retry.rb
# calculates the delay that should be used to retry the job. Can be overridden
# in a class to customize the retry strategy.
calculates the delay that should be used to retry the job. Can be overridden
in a class to customize the retry strategy.
calculates the delay that should be used to retry the job . Can be overridden in a class to customize the retry strategy .
def retry_delay
        schedule = extended_options['retry_schedule'] || DEFAULT_RETRY_SCHEDULE
        delay = retry_attempt >= schedule.count ? schedule.last : schedule[retry_attempt]
        delay + rand([30, delay.to_i].min)
      end
def retry_delay schedule = extended_options [ 'retry_schedule' ] || DEFAULT_RETRY_SCHEDULE delay = retry_attempt >= schedule . count ? schedule . last : schedule [ retry_attempt ] delay + rand ( [ 30 , delay . to_i ] . min ) end
calculates the delay that should be used to retry the job.
calculates the delay that should be used to retry the job .
# each time we retry, at most we want to # add a degree of randomness to it, but not more than the delay itself, or 30 seconds