mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 18:44:52 +01:00
build
This commit is contained in:
@@ -101,6 +101,9 @@ logging.debug(output)
|
|||||||
myCmd = "ls /dev/disk/by-uuid"
|
myCmd = "ls /dev/disk/by-uuid"
|
||||||
status, output = subprocess.getstatusoutput(myCmd)
|
status, output = subprocess.getstatusoutput(myCmd)
|
||||||
|
|
||||||
|
|
||||||
|
files_imported = 0
|
||||||
|
|
||||||
# Find drives to import
|
# Find drives to import
|
||||||
for l in output.splitlines():
|
for l in output.splitlines():
|
||||||
if l in drives:
|
if l in drives:
|
||||||
@@ -221,6 +224,7 @@ for d in import_drives:
|
|||||||
logging.debug("failed to move file {}".format(file_or_dir))
|
logging.debug("failed to move file {}".format(file_or_dir))
|
||||||
else:
|
else:
|
||||||
logging.debug("Nothing to import")
|
logging.debug("Nothing to import")
|
||||||
|
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "finished","file":f"{files_imported}"})
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logging.debug("Unknown device")
|
logging.debug("Unknown device")
|
||||||
|
|||||||
Reference in New Issue
Block a user