diff options
author | chenjiankun <chenjiankun1@huawei.com> | 2018-04-21 08:53:03 +0000 |
---|---|---|
committer | chenjiankun <chenjiankun1@huawei.com> | 2018-04-21 09:03:09 +0000 |
commit | 6ffbb81ec808aa615c7dad95fe6328ea5cc9c7b5 (patch) | |
tree | 0630754b3a6a8bf89c441392ef59d4e83db6c76a /reporting/api/server.py | |
parent | c77cf76cbf31e65aa599f71f33d59abc267b4e50 (diff) |
Add testing gating reporting page
Change-Id: I9f46d684a11b7999defffe983fc3224ef1a50412
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'reporting/api/server.py')
-rw-r--r-- | reporting/api/server.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/reporting/api/server.py b/reporting/api/server.py index e340b01..461e6d5 100644 --- a/reporting/api/server.py +++ b/reporting/api/server.py @@ -12,6 +12,7 @@ from tornado.options import define from tornado.options import options from api.urls import mappings +from api.service.result import ResultCache define("port", default=8000, help="run on the given port", type=int) @@ -20,7 +21,12 @@ def main(): tornado.options.parse_command_line() application = tornado.web.Application(mappings) application.listen(options.port) - tornado.ioloop.IOLoop.current().start() + + tornado.ioloop.PeriodicCallback(ResultCache.update, 1800000).start() + + ioloop = tornado.ioloop.IOLoop.current() + ioloop.call_later(1000, ResultCache.update()) + ioloop.start() if __name__ == "__main__": |