You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Processes page in the Web UI listing every live worker with its host, IP, command line, subscriptions,
busy threads, and state, fed by a heartbeat into the cosmo_processes KV bucket
Cosmo::Client names its NATS connection (cosmo-<program>-<host>-<pid>), so a process can be
identified in nats server report connections / /connz without cross-referencing host IPs.
Override with COSMO_CLIENT_NAME
COSMO_JS_TIMEOUT and COSMO_CONNECT_TIMEOUT make the JetStream API and TCP connect timeouts
configurable. Defaults are unchanged (5s / 2s, as in nats-pure); raise the former per-process
where waiting beats failing -- the web UI on a busy server -- and leave it alone for workers
COSMO_WEB_POLL_INTERVAL sets the web UI's htmx auto-refresh interval (default 5s, unchanged).
Enqueued jobs can be removed one by one from the web UI: each row has a Remove button backed by DELETE /jobs/enqueued/<seq>?stream_name=<stream>, which drops that message from the stream
kill -TTIN <pid> logs every thread's backtrace at WARN, tagged with the same tid as regular log
lines, so a stuck worker can be diagnosed without restarting it
kill -TSTP <pid> quiets a worker (no new jobs are fetched, in-flight work finishes) and kill -CONT <pid>
resumes it; kill -USR1 <pid> quiets it and exits once in-flight work drains
Jobs workers can pick their streams with --streams a,b / --stream a or COSMO_JOBS_STREAMS; unknown names
abort before boot. --no-scheduler keeps a worker off scheduled dispatch, so it fires no delayed jobs or crons
Cosmo::HTTPServer: -p/--http-port (or http.port) serves GET /health (200 when the engine runs and NATS
is connected, 503 otherwise) and GET /ping (liveness)
Cosmo::Batch.new(bid:) takes your own batch id instead of a generated one
The busy jobs page is paginated, shows each job's delivery attempt, and can stop live polling
Changed
Relicensed from LGPL-3.0 to MIT
Dashboard stats live under API::Stats on top of base classes: API::Busy is now API::Stats::Busy,
and API::Counter.instance/#with moved to API::Stats::Totals
nats-pure is capped below 2.7, and Cosmo's nats-pure patches skip themselves where nats-pure already has the fix
rack, rackup and webrick are no longer runtime dependencies: add rack to your Gemfile for the web UI,
and rack, rackup and webrick for Cosmo::HTTPServer
Fixed
The _cosmostats counters stream kept every increment forever (one message per processed job). It now keeps
only the latest message per counter (max_msgs_per_subject: 1); cosmo --setup applies this to existing
streams, trimming them without changing the totals
A cron job's enqueued_at is the time NATS fired the schedule again, not the time the scheduler
dispatched it on. The firing's timestamp is forwarded as X-Enqueued-At across the re-publish, so a
job that derives anything from enqueued_at is unaffected by a backlogged or restarted worker
Dead jobs record the exception class, message and backtrace, so the web UI's Error column is no longer empty.
The dead jobs page shows the stream a job came from and keeps expanded errors open
API::KV#size stopped at 25 keys, so the web UI showed at most 25 busy jobs
The dashboard's Scheduled count included cron templates, which the scheduled jobs page doesn't list
The scheduler dropped a job's headers when dispatching it from the scheduled stream
Several idle threads polling the same stream advanced its fetch backoff once each per round, reaching the
maximum backoff after a few rounds; it now advances once per round
Message#nack in stream processors raised NoMethodError; it is now an alias of nats-pure's nak