Expand description
Helpers for pushing test_run jobs onto the Redis queue that the
mockforge-test-runner worker consumes.
The runner crate owns the wire format — see
mockforge_test_runner::queue::QueuedJobDescriptor — but we don’t
depend on it here (registry-server → runner would be a backwards
dep). Instead this module produces the same JSON shape inline so a
drift between the two would be a serde test failure on the runner
side, not a build break.
Structs§
- Enqueued
Job - JSON shape the runner expects on the wire. Keep in sync with
mockforge_test_runner::queue::QueuedJobDescriptor.
Constants§
- DEFAULT_
QUEUE_ KEY - Default queue key. Mirrors the runner’s
MOCKFORGE_RUNNER_QUEUE_KEYdefault. Override at boot via env var if multiple runner pools share one Redis (e.g., dev + staging).
Functions§
- enqueue
- Push a job descriptor onto the runner’s queue. When Redis isn’t configured (e.g., local dev without a Redis container) this logs a warning and returns Ok — the test_runs row still exists, it just never gets picked up. That matches the existing pattern in other places that treat Redis as optional.