mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-23 22:25:26 +00:00
Refactor: Fixed docstring for retryer function (#2937)
This commit is contained in:
committed by
GitHub
parent
d5fdfe1251
commit
45f4320008
@@ -9,11 +9,10 @@ const RETRIES = PATs ? PATs : 7;
|
||||
/**
|
||||
* Try to execute the fetcher function until it succeeds or the max number of retries is reached.
|
||||
*
|
||||
* @param {object[]} retryerParams Object that contains the createTextNode parameters.
|
||||
* @param {object[]} retryerParams.fetcher The fetcher function.
|
||||
* @param {object[]} retryerParams.variables Object with arguments to pass to the fetcher function.
|
||||
* @param {number} retryerParams.retries How many times to retry.
|
||||
* @returns Promise<retryer>
|
||||
* @param {object[]} fetcher The fetcher function.
|
||||
* @param {object[]} variables Object with arguments to pass to the fetcher function.
|
||||
* @param {number} retries How many times to retry.
|
||||
* @returns {Promise<T>} The response from the fetcher function.
|
||||
*/
|
||||
const retryer = async (fetcher, variables, retries = 0) => {
|
||||
if (retries > RETRIES) {
|
||||
|
||||
Reference in New Issue
Block a user