diff options
| -rw-r--r-- | apps/proxy/src/index.js | 12 | ||||
| -rw-r--r-- | src/trigger/notifications.ts | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/proxy/src/index.js b/apps/proxy/src/index.js index fa2503b5..e6ed8690 100644 --- a/apps/proxy/src/index.js +++ b/apps/proxy/src/index.js @@ -242,7 +242,7 @@ const recommendedVolumeText = (volumeChapterBoundaries, progress) => { return recommended; }; -const handleMangaChapterCounts = async (request, env, ctx) => { +const handleMangaChapterCounts = async (request, env, executionContext) => { if (!hasSupabaseConfig(env)) return jsonResponse( request, @@ -300,7 +300,7 @@ const handleMangaChapterCounts = async (request, env, ctx) => { ); if (queueableRows.length) - ctx.waitUntil( + executionContext.waitUntil( Promise.all(queueBootstrap(env, queueableRows)).catch((error) => { if (!isMangadexIdConstraintConflict(error)) throw error; }), @@ -375,14 +375,14 @@ const handleMangaSync = async (request, env) => { }; export default { - async fetch(request, env, ctx) { + async fetch(request, env, executionContext) { try { const url = new URL(request.url); if (request.method === "OPTIONS") return handleOptions(request); if (url.pathname === "/manga/chapter-counts" && request.method === "POST") - return handleMangaChapterCounts(request, env, ctx); + return handleMangaChapterCounts(request, env, executionContext); if ( url.pathname === "/manga/native-chapter-counts" && @@ -409,9 +409,9 @@ export default { } }, - async scheduled(_controller, env, ctx) { + async scheduled(_controller, env, executionContext) { if (!hasSupabaseConfig(env)) return; - ctx.waitUntil(syncMangadexIndex(env)); + executionContext.waitUntil(syncMangadexIndex(env)); }, }; diff --git a/src/trigger/notifications.ts b/src/trigger/notifications.ts index 30a50a12..e36f913f 100644 --- a/src/trigger/notifications.ts +++ b/src/trigger/notifications.ts @@ -25,9 +25,9 @@ const subscriptionEndpoint = (subscription: unknown) => export const notificationsTask = schedules.task({ id: "notifications", - run: async (_payload, { ctx }) => { - const environment = ctx.environment.slug; - const triggerProjectReference = ctx.project.ref; + run: async (_payload, { ctx: taskContext }) => { + const environment = taskContext.environment.slug; + const triggerProjectReference = taskContext.project.ref; const supabase = createClient( ( await envvars.retrieve( |