Set PYTHONUNBUFFERED=1 in the three service files. Python buffers its output if it does not write to a terminal, so log lines reached the journal late.
16 lines
382 B
Desktop File
16 lines
382 B
Desktop File
[Unit]
|
|
Description=BMS tracking via InfluxDB
|
|
Requires=bmspy-server.service
|
|
|
|
[Service]
|
|
Type=exec
|
|
WorkingDirectory=/usr/local/bmspy
|
|
# Send each log line to the journal at once.
|
|
Environment=PYTHONUNBUFFERED=1
|
|
ExecStart=uv run --no-sync bmspy-influxdb --url http://localhost/ --org 0987654321 --bucket bms --token XXXX
|
|
RestartSec=5
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=default.target
|