Documentation
¶
Overview ¶
Command cleat-worker is a production worker daemon for executing cleat workflows. It polls PostgreSQL for runnable workflow instances using SELECT ... FOR UPDATE SKIP LOCKED, loads WASM modules, replays event history, and drives execution. It handles workflow suspension (sleep, await signals), heartbeating, and database failover.
Build:
go build -o cleat-worker ./cmd/cleat-worker/
Run:
cleat-worker --db "postgres://user:pass@localhost/cleat?sslmode=disable"
Package main implements the memory-aware concurrency controller and hysteresis state machine for the cleat-worker daemon. It ties together the OS-level memory monitor, the workflow store (for queue depth and memory estimates), and dynamic concurrency scaling with recovery backoff.
Package main implements OS-level memory monitoring for the cleat-worker daemon. It probes for the best available memory source (cgroup v2, /proc/meminfo, or Go heap stats) and provides cached reads with a configurable check interval.