mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 02:24:53 +01:00
build
This commit is contained in:
@@ -40,7 +40,7 @@ class mqtt_sender():
|
||||
|
||||
|
||||
mqtt_s = mqtt_sender("mqtt.home.lan", 1883, "jaydee", "jaydee1")
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/import", {"status": "started"})
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/import", {"status": "started","file":""})
|
||||
|
||||
|
||||
|
||||
@@ -195,6 +195,7 @@ for d in import_drives:
|
||||
logging.debug("Moving file {} into {}".format(filename, _FDEST))
|
||||
try:
|
||||
shutil.move("{}/{}".format(FULL_PATH,filename),_FDEST)
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/import", {"status": "started","file":filename})
|
||||
except:
|
||||
try:
|
||||
shutil.move("{}/{}".format(FULL_PATH,filename),"{}/{}".format(_FDEST,filename))
|
||||
@@ -209,8 +210,10 @@ for d in import_drives:
|
||||
subprocess.getstatusoutput(myCmd)
|
||||
else:
|
||||
logging.debug(f"File: {file_or_dir}")
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/import", {"status": "started","file":file_or_dir})
|
||||
try:
|
||||
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),_FDEST)
|
||||
|
||||
except:
|
||||
try:
|
||||
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),"{}/{}".format(_FDEST,file_or_dir))
|
||||
|
||||
Reference in New Issue
Block a user