Changeset 11533 in genesis for tools


Ignore:
Timestamp:
Oct 9, 2012, 9:01:27 PM (12 years ago)
Author:
rick
Message:

Make cache re-loading penalty part of update process, this will avoid timeouts at later stages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r11503 r11533  
    123123  normal_proxies = []
    124124  nameservers_cache = []
     125
     126def fill_cache():
     127 ''' Poor man re-loading of few cache items (the slow ones) '''
     128 for host in get_hostlist():
     129   datadumps[host] = get_yaml(host)
     130
     131
     132def reload_cache():
     133  clear_cache()
     134  fill_cache()
     135 
    125136 
    126137
     
    11471158      ('Refresh', '5; url=.'),
    11481159    ]
    1149     clear_cache()
     1160    reload_cache()
    11501161  else:
    11511162    base_uri = environ['PATH_INFO']
Note: See TracChangeset for help on using the changeset viewer.