fix: not destroying cache
This commit is contained in:
parent
a1548fe84a
commit
56c25df154
@ -58,10 +58,6 @@ def rclone_sync(website, local_path):
|
|||||||
config_file = write_rclone_config()
|
config_file = write_rclone_config()
|
||||||
remote_path = f"nextcloud:{NEXTCLOUD_PATH}/@{website}"
|
remote_path = f"nextcloud:{NEXTCLOUD_PATH}/@{website}"
|
||||||
|
|
||||||
if os.path.exists(local_path):
|
|
||||||
shutil.rmtree(local_path)
|
|
||||||
os.makedirs(local_path, exist_ok=True)
|
|
||||||
|
|
||||||
cmd = f"rclone --config {config_file} sync {remote_path} {local_path} --use-server-modtime --delete-after --fast-list --multi-thread-streams=4 --transfers=8 --checkers=16 --verbose"
|
cmd = f"rclone --config {config_file} sync {remote_path} {local_path} --use-server-modtime --delete-after --fast-list --multi-thread-streams=4 --transfers=8 --checkers=16 --verbose"
|
||||||
log_debug(f"Syncing from {remote_path} to {local_path}")
|
log_debug(f"Syncing from {remote_path} to {local_path}")
|
||||||
return stream_command(cmd)
|
return stream_command(cmd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user