updated further

This commit is contained in:
christian
2021-10-30 23:52:37 +02:00
parent 14c80a36b0
commit b3cbd7f6b6
8 changed files with 99 additions and 46 deletions
+9 -3
View File
@@ -58,10 +58,16 @@ def main():
distribute_files(source_files, dest)
for pathfile in source_files:
src.delete_local_demo(pathfile)
dest.delete_remote(source_files)
dest.delete_remote_demos(source_files)
elif "backup_local" in job["job_name"]:
zip_directory_cmd = f'zip -r {job["zipname"]}-{str(datetime.now()).split(" ")[0]}.zip {remotes[job["src"]]["path"]}'
zip_file_path = src.zip_local_directory(job)
if not dest.put(zip_file_path, dest.path):
log_msg = ''.join(["failed putting file: ", str(pathfile)])
logging.warning(log_msg)
sys.exit(1)
src.delete_local_zip(zip_file_path)
dest.delete_remote_zips(zip_file_path)
logging.info(('finished job: ', job))
if __name__ == '__main__':