lib/immutable-core-task-instance.js
/**
 * @function retryAuto
 *
 * decide whether or not to retry.
 *
 * in the future this should look at the type of error and always retry on
 * network errors, never retry on duplicate key errors or code errors that
 * won't change, and then optimistically retry on errors without specific
 * rules.
 *
 * currently the behavior is to always retry on a fixed schedule.
 *
 * @param {object} retry
 *
 * @returns {boolean}
 */
@function retryAuto
decide whether or not to retry.

in the future this should look at the type of error and always retry on
network errors, never retry on duplicate key errors or code errors that
won't change, and then optimistically retry on errors without specific
rules.

currently the behavior is to always retry on a fixed schedule.

@param {object} retry

@returns {boolean}
@function retryAuto decide whether or not to retry . in the future this should look at the type of error and always retry on network errors never retry on duplicate key errors or code errors that won ' t change and then optimistically retry on errors without specific rules . currently the behavior is to always retry on a fixed schedule . @param { object } retry @returns { boolean }
function retryAuto (retry) {
    var subStepTry = this.status.try[this.status.subStep]
    if (subStepTry > autoMaxRetry) {
        return false
    }
    var retryDuration = autoRetryDurations[subStepTry]
    this.status.retry = true
    this.record.data.nextRunTime = this.nextRunTime(retryDuration)
    this.record.data.complete = false
    return true
}
function retryAuto ( retry ) { var subStepTry = this . status . try [ this . status . subStep ] if ( subStepTry > autoMaxRetry ) { return false } var retryDuration = autoRetryDurations [ subStepTry ] this . status . retry = true this . record . data . nextRunTime = this . nextRunTime ( retryDuration ) this . record . data . complete = false return true }
@function retryAuto
 decide whether or not to retry.
@function retryAuto decide whether or not to retry .
// get try count for sub-step // do not retry if limit exceeded // get retry duration based on which try this is // set the retry flag // set next run time for duration // set complete flag to false since running started by not done // return true to save retry status