6570c25617
feat: configure queue retry delays with min/max bounds and update exponential backoff defaults
2025-12-17 09:25:07 -05:00
243c279ca9
feat: introduce exponential backoff utility
2025-12-17 07:54:24 -05:00
286824e3a1
refactor: standardize authorization header handling in queueTask
2025-12-17 07:54:03 -05:00
d5b113c884
test: enhance test environment mocking
2025-12-17 06:36:04 -05:00
6eb42f6a33
feat: update delayed task processing to a shared 9-hour maximum delay, remove invalid KV entries
2025-12-17 06:35:57 -05:00
05df043fbe
refactor: use fake Vitest Cloudflare environment for processDelayedTasks test
2025-12-17 06:35:05 -05:00
80a6f67ead
refactor: decouple Anilist watch status updates from API endpoint to an asynchronous queue worker.
2025-12-16 08:28:33 -05:00
1501aff3b6
fix: adjust task delay threshold to 9 hours ⏰
...
Updates the maximum delay for direct task queuing to 9 hours. This change ensures that tasks with delays exceeding this threshold are stored in KV for later processing.
The update also reflects the new delay threshold in the unit tests.
2025-12-16 08:28:14 -05:00
9b17f5bcfe
refactor: rename mockData.ts to mocks.ts and update import paths.
2025-12-16 08:04:26 -05:00
45bf96e764
refactor: Remove Anify and Consumet integrations, their dependencies, and the ipCheck script.
2025-12-16 08:03:05 -05:00
e8c7c7801f
chore: Update Vitest async test expectations and remove unused dependencies.
2025-12-16 07:50:39 -05:00
1140ffa8b8
refactor!: migrate away from bun
...
- migrate package management to pnpm
- migrate test suite to vitest
- also remove Anify integration
2025-12-16 07:50:38 -05:00
9116a561c3
refactor: Consolidate caching logic in Anilist DO by using handleCachedRequest for all data fetching methods and allowing dynamic TTL calculation.
2025-12-12 06:46:33 -05:00
67e07331a1
fix: 'upcoming season' popular titles not returning
2025-12-12 06:46:32 -05:00
6e3e3431c9
fix: add back remaining mock data paths
2025-12-12 06:46:32 -05:00
236a6ba165
fix: 'retry-after' headers not being read properly
2025-12-12 06:43:01 -05:00
c35e18218a
feat: add type safety to AniList fetching methods
2025-12-12 06:43:01 -05:00
3508f3461b
chore: rename getUser to getUserProfile
2025-12-12 06:42:58 -05:00
ad26cd6da3
feat: set up mock data to be used to generate baseline profiles
2025-12-06 07:27:14 -05:00
24d507a48f
feat(tasks): implement long-term delayed tasks with KV and Cron
2025-11-29 09:03:21 -05:00
8ca710d30d
fix(anilist): improve rate limit header parsing
2025-11-29 08:58:02 -05:00
25f5f80696
refactor: Replace generic AnilistDurableObject fetch endpoint with dedicated methods and update their usage.
2025-11-29 06:22:08 -05:00
b1e46ad6eb
feat: Centralize Anilist GraphQL queries, generalize Durable Object for multiple operations with caching, and add new controllers for search, popular titles, user data, and episode tracking.
2025-11-29 05:03:57 -05:00
a25111acbf
feat: Re-enable Anilist response caching and configure proxy URL via environment variable.
2025-11-28 17:00:18 +08:00
bd958fb1ab
feat: migrate to cloudflare d1 and queues
2025-11-28 16:32:35 +08:00
959265484c
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>
2025-11-14 13:07:36 +08:00
8175d73df1
refactor: ♻️ emoves Env parameter
...
Removes the `Env` parameter from several functions to simplify their signatures and rely on the global `env` for configuration.
This change reduces the number of arguments passed around, making the code cleaner and easier to maintain.
2025-08-10 19:22:14 -04:00
d680c97bc6
Removes console logs from title matching
...
Cleans up the code by removing console log statements used for debugging during the title matching process. This improves code readability and avoids unnecessary logging in the production environment.
2025-04-23 10:21:26 -04:00
b8ae211956
✨ feat(aniwatch): Improves title matching logic
...
- Enhances title matching accuracy when fetching Aniwatch IDs.
- Prioritizes user-preferred titles and falls back to English titles.
- Ensures only one fetch call is made per title if both english and userPreferred title are same.
- Adds a score threshold to filter low-quality matches.
- Fixes a bug where the episode list was not being returned.
2025-04-23 09:49:06 -04:00
d6a27e1fa4
fix: treat title as "unreleased" if title is too far away to schedule
2024-11-14 07:42:55 -05:00
da7c843e72
fix: task for anilist-updates not encoding body in base 64
2024-10-29 07:47:54 -04:00
9fafa5b45d
feat: improve title searching algorithm for aniwatch
2024-10-28 05:08:23 -04:00
592cc08853
feat: create routes to load popular titles
2024-10-27 13:59:49 -04:00
2dcf8630ab
fix: improve error logging
...
Cloudflare doesn't log causes, only the messages so splitting the logs in to 2
2024-10-27 08:49:31 -04:00
34958cfa69
chore: log which title is being selected when loading aniwatch
2024-10-27 08:41:16 -04:00
f8889eb550
fix: make sure to check body with hashed queue task name
2024-10-23 09:00:39 -04:00
1869771716
fix: if failed to validate body, trigger hashed task name flow
2024-10-22 08:20:03 +02:00
42c041a4e0
fix: hash task name when failing to queue new task
...
this should help with gcp cloud task deduplication causing 409 errors
2024-10-21 18:42:29 +08:00
7f8fd882aa
fix: throws "failed to queue" error when task already exists
2024-10-16 08:17:59 +08:00
37cf7bd738
fix: cloud tasks not being queued and failing silently
2024-10-14 08:28:22 +08:00
91dd250823
feat: create route to be able to mark episode as watched
2024-10-10 12:52:22 +02:00
8a20b72bcb
fix: update queue name for anilist updates
2024-10-06 18:41:09 -04:00
5f978205c4
remove taskId from optional args of queueTask
2024-10-06 08:48:43 -04:00
d13bc2a64e
refactor: update script
...
* runs promises serially instead of running them all at once
* directly calls /new-episode route for latest episode
2024-10-06 08:48:10 -04:00
271ea01b21
fix: test failures
2024-10-05 16:48:31 -04:00
5ea90bda55
feat: add more 429 checks
2024-10-05 15:52:38 -04:00
44ffa703b9
refactor: replace qstash with Google Cloud Tasks
2024-10-05 14:06:57 -04:00
85712ff0cf
chore: update getCurrentDomain to return undefined when not allowing localhost
2024-10-05 11:54:35 -04:00
44d579ee6d
refactor: create function to read admin SDK JSON
2024-10-05 11:21:20 -04:00
15c75eea5b
refactor: move fcm to gcloud folder
2024-10-05 10:57:18 -04:00