OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import gae_ts_mon | 5 import gae_ts_mon |
6 import gae_event_mon | 6 import gae_event_mon |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 import webapp2 | 9 import webapp2 |
10 | 10 |
11 THIRD_PARTY_DIR = os.path.join(os.path.dirname(__file__), 'third_party') | 11 THIRD_PARTY_DIR = os.path.join(os.path.dirname(__file__), 'third_party') |
12 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'dateutil')) | 12 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'dateutil')) |
13 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'gae-pytz')) | 13 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'gae-pytz')) |
14 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'google-api-python-client')) | 14 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'google-api-python-client')) |
15 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'httplib2', 'python2')) | 15 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'httplib2', 'python2')) |
16 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'oauth2client')) | 16 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'oauth2client')) |
17 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'six')) | 17 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'six')) |
18 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'test_results')) | 18 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'test_results')) |
19 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'time_functions')) | |
20 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'uritemplate')) | 19 sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'uritemplate')) |
21 | 20 |
22 from handlers.cron_dispatch import CronDispatch | 21 from handlers.cron_dispatch import CronDispatch |
23 from handlers.index import Index | 22 from handlers.index import Index |
24 from handlers.post_comment import PostComment | 23 from handlers.post_comment import PostComment |
25 from handlers.all_flake_occurrences import AllFlakeOccurrences | 24 from handlers.all_flake_occurrences import AllFlakeOccurrences |
26 from handlers.search import Search | 25 from handlers.search import Search |
27 from handlers import flake_issues | 26 from handlers import flake_issues |
28 | 27 |
29 handlers = [ | 28 handlers = [ |
30 (r'/', Index), | 29 (r'/', Index), |
31 (r'/post_comment', PostComment), | 30 (r'/post_comment', PostComment), |
32 (r'/all_flake_occurrences', AllFlakeOccurrences), | 31 (r'/all_flake_occurrences', AllFlakeOccurrences), |
33 (r'/search', Search), | 32 (r'/search', Search), |
34 (r'/cron/(.*)', CronDispatch), | 33 (r'/cron/(.*)', CronDispatch), |
35 (r'/issues/process/(.*)', flake_issues.ProcessIssue), | 34 (r'/issues/process/(.*)', flake_issues.ProcessIssue), |
36 (r'/issues/update-if-stale/(.*)', flake_issues.UpdateIfStaleIssue), | 35 (r'/issues/update-if-stale/(.*)', flake_issues.UpdateIfStaleIssue), |
37 (r'/issues/create_flaky_run', flake_issues.CreateFlakyRun), | 36 (r'/issues/create_flaky_run', flake_issues.CreateFlakyRun), |
38 (r'/override_issue_id', flake_issues.OverrideIssueId), | 37 (r'/override_issue_id', flake_issues.OverrideIssueId), |
39 ] | 38 ] |
40 | 39 |
41 app = webapp2.WSGIApplication(handlers, debug=True) | 40 app = webapp2.WSGIApplication(handlers, debug=True) |
42 gae_ts_mon.initialize(app) | 41 gae_ts_mon.initialize(app) |
43 gae_event_mon.initialize('flakiness_pipeline') | 42 gae_event_mon.initialize('flakiness_pipeline') |
OLD | NEW |