Open Joe-Heffer-Shef opened 3 years ago
Implement using systemd units: a service triggered by a timer https://github.com/rcgsheffield/urban_flows/commit/fa512532bcc7605f429696fd9535b983191dd08b
systemd unit status (use sudo to get debug logs):
Service
sa_cs1jsth@ufdatabridgedev:~$ sudo systemctl status databridge.service
● databridge.service - Data bridge from UFO to Awesome portal
Loaded: error (Reason: Exec format error)
Active: inactive (dead)
Docs: https://github.com/rcgsheffield/urban_flows/tree/master/awesome
Mar 09 12:06:46 ufdatabridgedev systemd[1]: /etc/systemd/system/databridge.service:11: Executable path is not absolute: mkdir --parents /home/uflo/logs
Timer
sa_cs1jsth@ufdatabridgedev:~$ sudo systemctl status databridge.timer
● databridge.timer - Data bridge from UFO to Awesome portal
Loaded: loaded (/etc/systemd/system/databridge.timer; disabled; vendor preset: enabled)
Active: inactive (dead)
Trigger: n/a
Docs: https://github.com/rcgsheffield/urban_flows/tree/master/awesome
Mar 09 02:06:21 ufdatabridgedev systemd[1]: databridge.timer: Refusing to start, unit to trigger not loaded.
Mar 09 02:06:21 ufdatabridgedev systemd[1]: Failed to start Data bridge from UFO to Awesome portal.
use absolute mkdir path https://github.com/rcgsheffield/urban_flows/commit/e06a873034b260694a04351d6892ab7238f6e9c2 needs testing
sync every 5 minutes