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:
@@ -199,10 +199,13 @@ for d in import_drives:
|
|||||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":filename,"device":_DEV})
|
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":filename,"device":_DEV})
|
||||||
try:
|
try:
|
||||||
shutil.move("{}/{}".format(FULL_PATH,filename),_FDEST)
|
shutil.move("{}/{}".format(FULL_PATH,filename),_FDEST)
|
||||||
|
files_imported += 1
|
||||||
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
shutil.move("{}/{}".format(FULL_PATH,filename),"{}/{}".format(_FDEST,filename))
|
shutil.move("{}/{}".format(FULL_PATH,filename),"{}/{}".format(_FDEST,filename))
|
||||||
|
files_imported += 1
|
||||||
except:
|
except:
|
||||||
logging.debug("failed to move file {}".format(filename))
|
logging.debug("failed to move file {}".format(filename))
|
||||||
logging.debug("Umounting")
|
logging.debug("Umounting")
|
||||||
@@ -217,10 +220,12 @@ for d in import_drives:
|
|||||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":file_or_dir,"device":_DEV})
|
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":file_or_dir,"device":_DEV})
|
||||||
try:
|
try:
|
||||||
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),_FDEST)
|
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),_FDEST)
|
||||||
|
files_imported += 1
|
||||||
|
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),"{}/{}".format(_FDEST,file_or_dir))
|
shutil.move("{}/{}".format(_DEV_DIR,file_or_dir),"{}/{}".format(_FDEST,file_or_dir))
|
||||||
|
files_imported += 1
|
||||||
except:
|
except:
|
||||||
logging.debug("failed to move file {}".format(file_or_dir))
|
logging.debug("failed to move file {}".format(file_or_dir))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user