Anton_Shiryaev
06/14/2023, 9:40 AM@task(name="synchronise data")
def sync_data() -> None:
"""Sync data to remote server"""
print("Start synchronisation")
rsync_cmd = (
f"rsync "
f"-avzx "
f"--no-perms "
f"--progress "
f"{my_data_folder} "
f"{my_server}:{servers_sync_folder}"
)
return None
It works great and logs, but I have no way of knowing if this task has failed with an error. Or not.
I can find out about this only by looking through the logs.
rsync: [sender] write error: Broken pipe (32)
But python itself believes that the command has completed successfully )Joshua Greenhalgh
06/14/2023, 9:53 AMJoshua Greenhalgh
06/14/2023, 10:03 AMAnton_Shiryaev
06/14/2023, 11:35 AM