Skip to content

Commit 17837ba

Browse files
committed
Adds force option to rebuild cache
1 parent 2e2d036 commit 17837ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

migration/openresearch/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ def getJsonFile(self):
165165
jsonFilePath="%s.json" % jsonPrefix
166166
return jsonFilePath
167167

168-
def fromCache(self,wikiuser:WikiUser):
168+
def fromCache(self,wikiuser:WikiUser,force=False):
169169
'''
170170
Args:
171171
wikiuser: the wikiuser to use
172172
'''
173173
jsonFilePath=self.getJsonFile()
174174
# TODO: fix upstream pyLodStorage
175175
jsonPrefix=jsonFilePath.replace(".json","")
176-
if os.path.isfile(jsonFilePath):
176+
if os.path.isfile(jsonFilePath) and not force:
177177
self.restoreFromJsonFile(jsonPrefix)
178178
else:
179179
self.fromWiki(wikiuser,askExtra=self.askExtra,profile=self.profile)

0 commit comments

Comments
 (0)