INNER CODE UNIT · TypeScript

TWENTY_MINUTES

grammyjs/grammY · src/bot.ts:679

            const TWENTY_MINUTES = 20 * 60 * 1000; // ms
            lastDelay = Math.min(TWENTY_MINUTES, 2 * lastDelay);
        }

        return strategy;
    }

    // Perform the actual task with retries
    let result: { ok: false } | { ok: true; value: T } = { ok: false };
    while (!result.ok) {
        try {
            result = { ok: true, value: await task() };
        } catch (error) {
            debugErr(error);
            const strategy = await handleError(error);
            switch (strategy) {
                case "retry":
                    continue;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…