ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /var/www/node_services/novosisneg/frontend/node_modules/@humanwhocodes/retry/dist/ |
Upload File : |
/**
* A class that manages a queue of retry jobs.
*/
export class Retrier {
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
* @param {number} [options.concurrency] The maximum number of concurrent tasks.
*/
constructor(check: Function, { timeout, maxDelay, concurrency }?: {
timeout?: number | undefined;
maxDelay?: number | undefined;
concurrency?: number | undefined;
} | undefined);
/**
* Gets the number of tasks waiting to be retried.
* @returns {number} The number of tasks in the retry queue.
*/
get retrying(): number;
/**
* Gets the number of tasks waiting to be processed in the pending queue.
* @returns {number} The number of tasks in the pending queue.
*/
get pending(): number;
/**
* Gets the number of tasks currently being processed.
* @returns {number} The number of tasks currently being processed.
*/
get working(): number;
/**
* Adds a new retry job to the queue.
* @param {Function} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<any>} A promise that resolves when the queue is
* processed.
*/
retry(fn: Function, { signal }?: {
signal?: AbortSignal | undefined;
} | undefined): Promise<any>;
#private;
}