Dieterbe/graph-explorer — pull request #12 by huoxy (2013-04-28 06:00:19+00:00)
Title: Enable multi-workers, and make data loading faster

* Make data loading faster

I cache these data("targets_all", "graphs_all") to disk files when run update_metrics.py,
then delete the urlopen in update_metrics.py, because app.py will reload these data by comparing `mtime` of these files when response /index.

* Enable multi-workers

When I tested multi-workers with gunicorn, I found it would ONLY refresh_data in a single worker. then I make app.py compare the mtime of these data files in each request to /index, if these files were modified, reload them.

It also works in a single worker as before, but some minutes faster, :)