feat: Add durable object for Anilist requests (#2)
This commit introduces a durable object to handle Anilist GraphQL requests, with the goal of preventing request duplication. The durable object is designed to cache responses from the Anilist API, with a TTL based on the `nextAiringEpisode` field in the response. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
@@ -67,9 +67,4 @@ app.get("/docs", swaggerUI({ url: "/openapi.json" }));
|
||||
|
||||
export default app;
|
||||
|
||||
export class AniwatchApiContainer /* extends Container */ {
|
||||
// Port the container listens on (default: 8080)
|
||||
defaultPort = 4444;
|
||||
// Time before container sleeps due to inactivity (default: 30s)
|
||||
sleepAfter = "2m";
|
||||
}
|
||||
export { AnilistDurableObject as AnilistDo } from "~/libs/anilist/anilist-do.ts";
|
||||
|
||||
Reference in New Issue
Block a user