Changeset 13938 in genesis


Ignore:
Timestamp:
Jul 6, 2017, 9:14:20 AM (7 years ago)
Author:
rick
Message:

Delete support for WSCGI\n\nNever worked properly with caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13937 r13938  
    124124nameservers_cache = []
    125125relations_cache = None
    126 def clear_cache():
    127   ''' Poor mans cache implementation '''
    128   global datadump_cache, interface_list_cache, rc_conf_local_cache, ileiden_proxies, normal_proxies, nameservers_cache
    129   datadump_cache = {}
    130   interface_list_cache = {}
    131   rc_conf_local_cache = {}
    132   ileiden_proxies = OrderedDict()
    133   normal_proxies = []
    134   nameservers_cache = []
    135   relations_cache = None
    136126
    137127NO_DHCP = 0
     
    15051495      ('Refresh', '5; url=.'),
    15061496    ]
    1507     reload_cache()
    15081497  else:
    15091498    base_uri = environ['REQUEST_URI']
     
    18131802
    18141803def print_cgi_response(response_headers, output):
    1815   """Could we not use some kind of wsgi wrapper to make this output?"""
    18161804  for header in response_headers:
    18171805     print "%s: %s" % header
     
    18201808
    18211809
    1822 def fill_cache():
    1823  ''' Poor man re-loading of few cache items (the slow ones) '''
    1824  for host in get_hostlist():
    1825    get_yaml(host)
    1826 
    1827 
    1828 def reload_cache():
    1829   clear_cache()
    1830   fill_cache()
    1831  
    18321810
    18331811def main():
     
    23652343    print_cgi_response(response_headers, output)
    23662344
    2367 def application(environ, start_response):
    2368   status = '200 OK'
    2369   response_headers, output = process_cgi_request(environ)
    2370   start_response(status, response_headers)
    2371 
    2372   # Debugging only
    2373   # output = 'wsgi.multithread = %s' % repr(environ['wsgi.multithread'])
    2374   # soutput += '\nwsgi.multiprocess = %s' % repr(environ['wsgi.multiprocess'])
    2375   return [output]
    2376 
    23772345if __name__ == "__main__":
    23782346  main()
Note: See TracChangeset for help on using the changeset viewer.