Skip to content

Commit

Permalink
Invalidate dircache after rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Mar 5, 2024
1 parent eb9837a commit 7c52f17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions saturnfs/client/saturnfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import math
import os
from quopri import decodestring
import weakref
from concurrent.futures import ThreadPoolExecutor
from copy import copy
Expand Down Expand Up @@ -789,11 +790,14 @@ def rsync(
max_batch_workers: int = settings.SATURNFS_DEFAULT_MAX_WORKERS,
max_file_workers: int = 1,
**kwargs,
):
) -> None:
kwargs["fs"] = SaturnGenericFilesystem(
max_batch_workers=max_batch_workers, max_file_workers=max_file_workers
)
return rsync(source, destination, delete_missing=delete_missing, **kwargs)
rsync(source, destination, delete_missing=delete_missing, **kwargs)
if destination.startswith(settings.SATURNFS_FILE_PREFIX):
self.invalidate_cache(destination)
return None

def list_uploads(
self, path: str, is_copy: Optional[bool] = None
Expand Down

0 comments on commit 7c52f17

Please sign in to comment.