See Release Notes
Long Term Support Release
Differences Between: [Versions 401 and 402] [Versions 401 and 403]
(no description)
File Size: | 257 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Class: Google_Task_Runner - X-Ref
A task runner with exponential backoff support.__construct(Google_Client $client,$name,$action,array $arguments = array() X-Ref |
Creates a new task runner with exponential backoff support. param: Google_Client $client The current API client param: string $name The name of the current task (used for logging) param: callable $action The task to run and possibly retry param: array $arguments The task arguments |
canAttmpt() X-Ref |
Checks if a retry can be attempted. return: boolean |
run() X-Ref |
Runs the task and (if applicable) automatically retries when errors occur. return: mixed |
attempt() X-Ref |
Runs a task once, if possible. This is useful for bypassing the `run()` loop. NOTE: If this is not the first attempt, this function will sleep in accordance to the backoff configurations before running the task. return: boolean |
backOff() X-Ref |
Sleeps in accordance to the backoff configurations. |
getDelay() X-Ref |
Gets the delay (in seconds) for the current backoff period. return: float |
getJitter() X-Ref |
Gets the current jitter (random number between -$this->jitter and $this->jitter). return: float |