src/libs/Network.js
/**
 * Checks to see if a request should be retried when the queue is "paused".
 *
 * @param {Object} request
 * @param {String} request.command
 * @param {Object} request.data
 * @param {Boolean} request.data.doNotRetry
 * @param {String} [request.data.returnValueList]
 * @return {Boolean}
 */
Checks to see if a request should be retried when the queue is "paused".
Checks to see if a request should be retried when the queue is " paused " .
function shouldRetryRequest(request) {
    const doNotRetry = lodashGet(request, 'data.doNotRetry', false);
    const logParams = {command: request.command, doNotRetry, isQueuePaused};
    const returnValueList = lodashGet(request, 'data.returnValueList');
    if (returnValueList) {
        logParams.returnValueList = returnValueList;
    }
    if (doNotRetry) {
        console.debug('Skipping request that should not be re-tried: ', logParams);
        return false;
    }
    console.debug('Skipping request and re-queueing: ', logParams);
    return true;
}
function shouldRetryRequest ( request ) { const doNotRetry = lodashGet ( request , 'data.doNotRetry' , false ) ; const logParams = { command : request . command , doNotRetry , isQueuePaused } ; const returnValueList = lodashGet ( request , 'data.returnValueList' ) ; if ( returnValueList ) { logParams . returnValueList = returnValueList ; } if ( doNotRetry ) { console . debug ( 'Skipping request that should not be re-tried: ' , logParams ) ; return false ; } console . debug ( 'Skipping request and re-queueing: ' , logParams ) ; return true ; }
Checks to see if a request should be retried when the queue is "paused".
Checks to see if a request should be retried when the queue is " paused " .