diff --git a/src/worker.ts b/src/worker.ts index c1daf9a..ea872dd 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -1,18 +1,16 @@ -import { addMissedUpdatesRole, callDiscordNicknameBatchUpdate, ping } from './handlers/scheduledEventHandler'; +import { addMissedUpdatesRole, callDiscordNicknameBatchUpdate } from './handlers/scheduledEventHandler'; import { env } from './types/global.types'; -const EVERY_4_HOURS = '0 */4 * * *'; const EVERY_6_HOURS = '0 */6 * * *'; const EVERY_12_HOURS = '0 */12 * * *'; export default { + // eslint-disable-next-line no-unused-vars async scheduled(req: ScheduledController, env: env, ctx: ExecutionContext) { switch (req.cron) { - case EVERY_4_HOURS: - ctx.waitUntil(ping(env)); - break; - case EVERY_6_HOURS: + case EVERY_6_HOURS: { return await callDiscordNicknameBatchUpdate(env); + } case EVERY_12_HOURS: { return await addMissedUpdatesRole(env); } diff --git a/wrangler.toml b/wrangler.toml index 2af8848..da44cc5 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -22,7 +22,7 @@ services = [ ] [triggers] -crons = ["0 */4 * * *", "0 */6 * * *","0 */12 * * *" ] +crons = ["0 */6 * * *","0 */12 * * *" ] # # Durable Object binding - For more information: https://developers.cloudflare.com/workers/runtime-apis/durable-objects # [[durable_objects]]