nandi/gleanpublic Fork
⑂ 49c0781
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Let the Modal container scale to zero

The always-warm container existed to keep the background workers running
continuously; accept them pausing while idle instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandithebull committed 2026-09-21T19:10:59-07:00 Browse files
49c0781 parent: 351bd41
modified deploy/modal/modal_app.py +4 -3
@@ -151,9 +151,10 @@ def _snapshot_loop(stop: threading.Event) -> None:
151151 # Single writer: SQLite tolerates exactly one process writing these files,
152152 # and the snapshot scheme assumes one container owns the data.
153153 max_containers=1,
154- # Glean's background workers (Jetstream consumer, PDS sync, clustering,
155- # feed fetch) only run while a container is alive, so keep one alive.
156- min_containers=1,
154+ # Scale to zero when idle: Glean's background workers (Jetstream consumer,
155+ # PDS sync, clustering, feed fetch) only run while a container is alive, so
156+ # they pause between requests and resume on the next one.
157+ min_containers=0,
157158 scaledown_window=1200,
158159 timeout=24 * 60 * 60,
159160 cpu=2,
@@ -151,9 +151,10 @@ def _snapshot_loop(stop: threading.Event) -> None:
151 # Single writer: SQLite tolerates exactly one process writing these files,151 # Single writer: SQLite tolerates exactly one process writing these files,
152 # and the snapshot scheme assumes one container owns the data.152 # and the snapshot scheme assumes one container owns the data.
153 max_containers=1,153 max_containers=1,
154- # Glean's background workers (Jetstream consumer, PDS sync, clustering,154+ # Scale to zero when idle: Glean's background workers (Jetstream consumer,
155- # feed fetch) only run while a container is alive, so keep one alive.155+ # PDS sync, clustering, feed fetch) only run while a container is alive, so
156- min_containers=1,156+ # they pause between requests and resume on the next one.
157+ min_containers=0,
157 scaledown_window=1200,158 scaledown_window=1200,
158 timeout=24 * 60 * 60,159 timeout=24 * 60 * 60,
159 cpu=2,160 cpu=2,