Skip to content

Commit

Permalink
avoid loading stale metadata in S3 persister
Browse files Browse the repository at this point in the history
  • Loading branch information
yversley-ottogroup committed May 6, 2020
1 parent a4efa8a commit ed6842d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions palladium/persistence.py
Expand Up @@ -712,6 +712,8 @@ def __init__(self, **kwargs):
self.fs = s3fs.S3FileSystem(anon=False)

def open(self, path, mode='r'):
# this is needed to avoid reading stale metadata JSONs
self.fs.invalidate_cache()
return self.fs.open(path, mode=mode)

def exists(self, path):
Expand Down

0 comments on commit ed6842d

Please sign in to comment.