trading_agent.doctor.checks.service_check
¶
Checks that trading-agent runs as a systemd user service, so it restarts after a crash and at every boot.
Typical usage example:
result = ServiceCheck().run()
ServiceCheck
¶
Bases: DoctorCheck
Asks systemd whether the service is enabled and running.
run
¶
Asks systemctl --user is-enabled and is-active.
Returns:
| Type | Description |
|---|---|
CheckResult
|
OK when enabled and active; failed otherwise, with the commands that install it. |