mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Every webapp process was running its own HistoryAuditMonitor (and the per-process Postgres LISTEN that comes with it). Move to a single elected producer via a new is_history_audit_monitor role on DatabaseHeartbeat. The election prefers any WorkerProcess with app_type=sse_monitor, falling back to the max-server_name webapp when no dedicated daemon is running, so the monitor migrates cleanly when the leader dies. Add a standalone galaxy-sse-monitor process (new lib/galaxy/sse_monitor package, galaxy-sse-monitor console script) that builds a minimal GalaxyManagerApplication, registers itself as sse_monitor.<host>.<pid>, and blocks on SIGTERM. Running this daemon moves SSE event production out of the webapp so its dispatch can't stall behind a webapp's GIL. Gate HistoryAuditMonitor.start/stop on the role callback rather than a postfork hook; make start() restart-safe (clear _exit) and shutdown() idempotent so role transitions can cycle the monitor.
.. image:: https://badge.fury.io/py/galaxy-app.svg :target: https://pypi.org/project/galaxy-app/ Overview -------- The Galaxy_ application logic (backend). * Code: https://github.com/galaxyproject/galaxy .. _Galaxy: http://galaxyproject.org/