MCPcopy
hub / github.com/iterative/cml / throttleHandler

Function throttleHandler

src/drivers/github.js:56–64  ·  view source on GitHub ↗
(reason, offset)

Source from the content-addressed store, hash-verified

54 if (!token) throw new Error('token not found');
55
56 const throttleHandler = (reason, offset) => async (retryAfter, options) => {
57 if (options.request.retryCount <= 5) {
58 logger.info(
59 `Retrying because of ${reason} in ${retryAfter + offset} seconds`
60 );
61 await new Promise((resolve) => setTimeout(resolve, offset * 1000));
62 return true;
63 }
64 };
65 const octokitOptions = {
66 request: { agent: new ProxyAgent() },
67 auth: token,

Callers 1

octokitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected