feat: introduce exponential backoff utility

This commit is contained in:
2025-12-17 07:52:48 -05:00
parent 286824e3a1
commit 243c279ca9
2 changed files with 54 additions and 3 deletions

View File

@@ -4,9 +4,11 @@ import { OpenAPIHono } from "@hono/zod-openapi";
import { maybeUpdateLastConnectedAt } from "~/controllers/maybeUpdateLastConnectedAt";
import type { QueueName } from "~/libs/tasks/queueName.ts";
import { onNewEpisode } from "./controllers/internal/new-episode";
import { AnilistUpdateType } from "./libs/anilist/updateType";
import type { QueueBody } from "./libs/tasks/queueTask";
import { onNewEpisode } from "~/controllers/internal/new-episode";
import { AnilistUpdateType } from "~/libs/anilist/updateType";
import type { QueueBody } from "~/libs/tasks/queueTask";
import { calculateExponentialBackoff } from "~/libs/calculateExponentialBackoff";
import { Duration, type DurationLike } from "luxon";
export const app = new OpenAPIHono<{ Bindings: Env }>();