feat(schedules): register no workflows, so the Worker never fires - #13
Merged
Merged
Conversation
jshvn/apartments and jshvn/terraform move to jshvn/dispatch. With the registry empty, task crons writes an empty triggers.crons, and the deploy's PUT to the script's schedules replaces the two live cron triggers with none. The Worker stays deployed with its secrets and fires nothing. The Dispatch.run tests that read the real registry now claim targets of their own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes every schedule, so the Worker triggers nothing. The repo and the deployed Worker both stay.
schedules/apartments.tsandschedules/terraform.tsare deleted, and the registry inschedules/index.tsis empty. Both repos are now scheduled by jshvn/dispatch.wrangler.jsoncgets"crons": [], written bytask crons. wrangler deploystriggers.cronswithif (crons), and an empty array is truthy, so the deploy PUTs an empty list to/workers/scripts/dispatch/schedules. That replaces the two live triggers (17 5 * * *,2 */4 * * *) with none.Dispatch.runtests that used real targets now claim fixture targets through the mockedselectTargets. The instance-id legality test walks every expression inSLOTSrather than the configured crons, which are now empty.The Worker's secrets and the App's key stay as they are.
Test plan
task check: typecheck, format, 46 tests, dry-run deploytask targetsprints no targetsdispatch(Workers & Pages → dispatch → Settings → Trigger events)