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:
@@ -176,7 +176,7 @@ while True:
|
||||
logging.debug("Moving file {} into {}".format(filename, _FDEST))
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":filename,"device":_DEV})
|
||||
try:
|
||||
shutil.copy("{}/{}".format(FULL_PATH,filename),_FDEST)
|
||||
#shutil.copy("{}/{}".format(FULL_PATH,filename),_FDEST)
|
||||
myCmd = f"rsync -avz {FULL_PATH}/{filename} {_FDEST}"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
|
||||
@@ -202,14 +202,14 @@ while True:
|
||||
logging.debug(f"File: {file_or_dir}")
|
||||
mqtt_s.send_mqtt_message("sectorq/auto_import/job", {"status": "started","file":file_or_dir,"device":_DEV})
|
||||
try:
|
||||
shutil.copy("{}/{}".format(_DEV_DIR,file_or_dir),_FDEST)
|
||||
#shutil.copy("{}/{}".format(_DEV_DIR,file_or_dir),_FDEST)
|
||||
myCmd = f"rsync -avz {_DEV_DIR}/{file_or_dir} {_FDEST}"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
files_imported += 1
|
||||
|
||||
except:
|
||||
try:
|
||||
shutil.copy("{}/{}".format(_DEV_DIR,file_or_dir),"{}/{}".format(_FDEST,file_or_dir))
|
||||
#shutil.copy("{}/{}".format(_DEV_DIR,file_or_dir),"{}/{}".format(_FDEST,file_or_dir))
|
||||
myCmd = f"rsync -avz {_DEV_DIR}/{file_or_dir} {_FDEST}"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user