mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
@@ -214,13 +214,9 @@ for d in import_drives:
|
||||
files_imported += 1
|
||||
except:
|
||||
logging.debug("failed to move file {}".format(filename))
|
||||
logging.debug("Umounting")
|
||||
myCmd = f"sudo umount {_DEV_MOUNT}"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
logging.debug(output)
|
||||
logging.debug(status)
|
||||
|
||||
#myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100"
|
||||
subprocess.getstatusoutput(myCmd)
|
||||
#subprocess.getstatusoutput(myCmd)
|
||||
else:
|
||||
logging.debug(f"File: {file_or_dir}")
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":file_or_dir,"device":_DEV})
|
||||
@@ -234,6 +230,11 @@ for d in import_drives:
|
||||
files_imported += 1
|
||||
except:
|
||||
logging.debug("failed to move file {}".format(file_or_dir))
|
||||
logging.debug("Umounting")
|
||||
myCmd = f"sudo umount {_DEV_MOUNT}"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
logging.debug(output)
|
||||
logging.debug(status)
|
||||
else:
|
||||
logging.debug("Nothing to import")
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "finished","file":f"{files_imported}","device":_DEV})
|
||||
|
||||
Reference in New Issue
Block a user