Files
splatoon3.ink/workers/compressor/wrangler.jsonc
Matt Isenhower a406f73622 Add switches for renewals and compression; judge renewals by their result
A credential renewal now counts as failed only when it ends without a new
bullet token. A step that failed and was made up for by a later one (znca
briefly unavailable, say) is kept as a warning and no longer goes to
Sentry.

Everything that runs on its own now has a switch in the admin panel:
scheduled renewals (one switch for every region) and the daily archive
compression join the lanes' scheduling switches. The compressor's starts
from AUTOMATIC_SCHEDULING_ENABLED: on in dev, off in production, so the
production compressor can be deployed before spectre stops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:08:10 -08:00

66 lines
2.5 KiB
JSON

{
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "splatoon3-ink-compressor",
"main": "src/index.mjs",
"compatibility_date": "2026-09-03",
"compatibility_flags": ["nodejs_compat"],
"workers_dev": true,
"preview_urls": false,
"migrations": [{ "tag": "v1", "new_sqlite_classes": ["Compressor"] }],
"observability": { "enabled": true, "logs": { "head_sampling_rate": 1 } },
// Select --env dev or --env production explicitly. Deploying builds the container image with
// a local Docker-compatible CLI (Dockerfile, built from the repository root).
// Secrets: RUN_TOKEN, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (a DigitalOcean Spaces key
// that can read and write the archive bucket), optional SENTRY_DSN.
"env": {
"dev": {
"name": "splatoon3-ink-dev-compressor",
"vars": {
// Dev's own archive Space, the one the dev updater writes. Never the production one.
"AWS_S3_ENDPOINT": "https://nyc3.digitaloceanspaces.com",
"AWS_REGION": "nyc3",
"AWS_S3_ARCHIVE_BUCKET": "splatoon3ink-archive-test",
"ENVIRONMENT": "dev",
// Whether the daily cron starts a run until the admin panel turns it on or off.
"AUTOMATIC_SCHEDULING_ENABLED": "true"
},
"triggers": { "crons": ["30 0 * * *"] },
"containers": [
{
"class_name": "Compressor",
"image": "./Dockerfile",
"image_build_context": "../..",
// 1/2 vCPU, 4 GiB, 8 GB disk: a day (~430 MB of snapshots) compresses in under a minute.
"instance_type": "standard-1",
"max_instances": 1
}
],
"durable_objects": { "bindings": [{ "name": "COMPRESSOR", "class_name": "Compressor" }] }
},
"production": {
"name": "splatoon3-ink-compressor",
"vars": {
"AWS_S3_ENDPOINT": "https://nyc3.digitaloceanspaces.com",
"AWS_REGION": "nyc3",
"AWS_S3_ARCHIVE_BUCKET": "splatoon3ink-archive",
"ENVIRONMENT": "production",
// Off until cutover: spectre also compresses at 00:30 UTC. Turn it on from the admin
// panel once spectre has stopped.
"AUTOMATIC_SCHEDULING_ENABLED": "false"
},
"triggers": { "crons": ["30 0 * * *"] },
"containers": [
{
"class_name": "Compressor",
"image": "./Dockerfile",
"image_build_context": "../..",
"instance_type": "standard-1",
"max_instances": 1
}
],
"durable_objects": { "bindings": [{ "name": "COMPRESSOR", "class_name": "Compressor" }] }
}
}
}