Back to home page

EIC code displayed by LXR

 
 

    


Warning, /swf-monitor/epicprod-ops-agent.service is written in an unsupported language. File is not indexed.

0001 [Unit]
0002 Description=ePIC Production Operations Agent (epicprod-ops)
0003 After=network.target
0004 # System singleton on the anycast queue /queue/epicprod.ops. A persistent agent
0005 # that keeps exiting is sick regardless of exit code: cap the restart burst so it
0006 # lands in 'failed' (visible) instead of flapping forever. The cleaner-killer cron
0007 # reaps duplicates and recovers a capped-out unit (reset-failed + restart).
0008 StartLimitIntervalSec=120
0009 StartLimitBurst=5
0010 
0011 [Service]
0012 Type=simple
0013 User=wenauseic
0014 Group=eic
0015 WorkingDirectory=/opt/swf-monitor/current
0016 # All env (REQUESTS_CA_BUNDLE, X509_USER_PROXY, ACTIVEMQ_*, SWF_*) comes from the
0017 # deploy EnvironmentFile — the single source the web tier and crons also read.
0018 # SWF_TMP_DIR is omitted: the agent and the web view both default to /data/swf-tmp.
0019 EnvironmentFile=/opt/swf-monitor/config/env/production.env
0020 ExecStart=/opt/swf-monitor/current/.venv/bin/python /opt/swf-monitor/current/agents/epicprod_ops_agent.py
0021 Restart=always
0022 RestartSec=15
0023 # A stop or restart signals the agent alone (mixed); BaseAgent's stop is bounded:
0024 # it stops consuming, drains up to SWF_AGENT_DRAIN_LIMIT_S (60 s), ends the doer
0025 # processes still running, exits, with a hard exit at about 105 s if anything
0026 # blocks. Whatever the doers left in the control group is killed when the main
0027 # process exits. The stop timeout sits a little above the hard-exit limit, so
0028 # systemd is the last resort and not the first: on 2026-09-07 a stop with the
0029 # doer's hour as its bound left the agent wedged and publishing nothing.
0030 KillMode=mixed
0031 TimeoutStopSec=120
0032 # Deliberate-shutdown back door: the agent exits 100 on a bus 'shutdown' (see
0033 # agents/epicprod_ops_agent.py). systemd must treat that as a clean, final stop,
0034 # not a failure to restart. Any other exit code is a crash and is restarted.
0035 SuccessExitStatus=100
0036 RestartPreventExitStatus=100
0037 
0038 [Install]
0039 WantedBy=multi-user.target