Skip to content
Snippets Groups Projects
Commit b1cc54fb authored by Erik Reid's avatar Erik Reid
Browse files

don't keep old data, strip cache

parent 11e500a8
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,14 @@ def load_current_data(data_file):
return json.load(data_file)
def _ignore_key(key):
if key.startswith('classifier-cache:'):
return True
if key.startswith('joblog:'):
return True
return False
def _redis_client_proc(key_queue, value_queue, hostname, db_index):
r = redis.StrictRedis(host=hostname, db=db_index)
while True:
......@@ -20,6 +28,9 @@ def _redis_client_proc(key_queue, value_queue, hostname, db_index):
if not key:
break
if _ignore_key(key):
continue
value_queue.put({
'key': key,
'value': r.get(key).decode('utf-8')
......@@ -80,7 +91,7 @@ if __name__ == '__main__':
conf = {
'file': 'router-info.json',
'delete-all': False,
'delete-all': True,
'thread-count': 20,
'loaders': [
# {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment