Skip to content

An open-source, faster Devin alternative

TypeScript

api-edge: restart halted_at for orgs halted at release (D1 0016)

Mohamed Habib via Computer3f3b94c4acb9
diff --git a/cloudflare-workers/api-edge/migrations/0016_orgs_halted_at_restart.sql b/cloudflare-workers/api-edge/migrations/0016_orgs_halted_at_restart.sql
new file mode 100644
index 00000000..1fb43a56
--- /dev/null
+++ b/cloudflare-workers/api-edge/migrations/0016_orgs_halted_at_restart.sql
@@ -0,0 +1,8 @@
+-- orgs.halted_at (serverless-agents-ws 086): from this release it holds while an
+-- org stays halted, and blue parks an unpaid computer 7 days after it. Before,
+-- each projection re-stamped it, so a halted org's stamp is only its last
+-- projection and may be weeks old. Restart the clock for orgs halted now, so
+-- their 7 days begin at this release, not at a stale stamp. CI applies this
+-- before the Worker deploy; the old Worker re-stamps forward until then, which
+-- only moves the clock later.
+UPDATE orgs SET halted_at = unixepoch() WHERE is_halted = 1;