Skip to content

Commit

Permalink
Save cache after every 10 entries
Browse files Browse the repository at this point in the history
  • Loading branch information
daoudclarke committed Mar 6, 2015
1 parent f4e8b84 commit 745e82b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fbsearch/cachedoracle.py
Expand Up @@ -43,6 +43,11 @@ def get_cache_oracle_data(dataset):
i += 1
logger.info("Completed: %d", i)

if i % 10 == 0:
logger.info("Saving caches")
oracle.connection.save_cache()
logger.info("Saving complete")


def save_oracle_data(oracle_results):
with open(settings.ORACLE_CACHE_PATH, 'w') as cache_file:
Expand Down

0 comments on commit 745e82b

Please sign in to comment.