Skip to content

Commit

Permalink
monitor: Find completed devices by logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewey-rpi committed Oct 8, 2024
1 parent 8c9bc41 commit 8bf55f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions monitor/systemctl_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ def list_seen_devices():

return units


# Completed devices don't show up as systemd units, so we _must_ fall back to the log files
def list_completed_devices():
all_devices = list_seen_devices()
all_devices = []
if os.path.exists("/var/log/rpi-sb-provisioner/"):
all_devices = os.listdir("/var/log/rpi-sb-provisioner")
completed_devices = []
for device in all_devices:
if os.path.exists("/var/log/rpi-sb-provisioner/" + device + "/progress"):
Expand Down

0 comments on commit 8bf55f3

Please sign in to comment.