protected function getSleepSeconds($attempts, $maxAttempts = null)
    {
        if ($maxAttempts && $attempts >= $maxAttempts) {
            return false;
        }

        // very complex.
        return $attempts * $attempts;
    }
protected function getSleepSeconds($attempts, $maxAttempts = null)
    {
        if ($maxAttempts && $attempts >= $maxAttempts) {
            return false;
        }

        // very complex.
        return $attempts * $attempts;
    }
protected function getSleepSeconds ( $ attempts , $ maxAttempts = null ) { if ( $ maxAttempts && $ attempts >= $ maxAttempts ) { return false ; } // very complex. return $ attempts * $ attempts ; }
Determines next sleep time for report queue checking.
Uses an incredibly complex backing off algorithm so that long requests don't have to check as often.

@param    $attempts      int    The number of checks so far
@param    $maxAttempts    int User specified maximum number of checks

@return    mixed to stop checking OR the number of seconds for the next sleep
Determines next sleep time for report queue checking . Uses an incredibly complex backing off algorithm so that long requests don t have to check as often .