Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Side by Side Diff: infra/services/builder_alerts/__main__.py

Issue 2183453002: Add ts_mon defaults in builder_alrets (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import contextlib 7 import contextlib
8 import cStringIO 8 import cStringIO
9 import datetime 9 import datetime
10 import gzip 10 import gzip
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 parser.add_argument('data_url', action='store', nargs='*') # Deprecated 352 parser.add_argument('data_url', action='store', nargs='*') # Deprecated
353 parser.add_argument('--use-cache', action='store_true') 353 parser.add_argument('--use-cache', action='store_true')
354 parser.add_argument('--master-filter', action='store') 354 parser.add_argument('--master-filter', action='store')
355 parser.add_argument('--builder-filter', action='store') 355 parser.add_argument('--builder-filter', action='store')
356 parser.add_argument('--processes', default=PARALLEL_TASKS, action='store', 356 parser.add_argument('--processes', default=PARALLEL_TASKS, action='store',
357 type=int) 357 type=int)
358 parser.add_argument('--jobs', default=CONCURRENT_TASKS, action='store', 358 parser.add_argument('--jobs', default=CONCURRENT_TASKS, action='store',
359 type=int) 359 type=int)
360 logs.add_argparse_options(parser) 360 logs.add_argparse_options(parser)
361 outer_loop.add_argparse_options(parser) 361 outer_loop.add_argparse_options(parser)
362
362 ts_mon.add_argparse_options(parser) 363 ts_mon.add_argparse_options(parser)
364 parser.set_defaults(
365 ts_mon_target_type='task',
366 ts_mon_task_service_name='builder-alerts',
367 ts_mon_task_job_name='builder-alerts',
368 )
363 369
364 gatekeeper_json = os.path.join(build_scripts_dir, 'slave', 'gatekeeper.json') 370 gatekeeper_json = os.path.join(build_scripts_dir, 'slave', 'gatekeeper.json')
365 parser.add_argument('--gatekeeper', action='store', default=gatekeeper_json) 371 parser.add_argument('--gatekeeper', action='store', default=gatekeeper_json)
366 gatekeeper_trees_json = os.path.join(build_scripts_dir, 'slave', 372 gatekeeper_trees_json = os.path.join(build_scripts_dir, 'slave',
367 'gatekeeper_trees.json') 373 'gatekeeper_trees.json')
368 parser.add_argument('--gatekeeper-trees', action='store', 374 parser.add_argument('--gatekeeper-trees', action='store',
369 default=gatekeeper_trees_json) 375 default=gatekeeper_trees_json)
370 376
371 parser.add_argument('--findit-api-url', 377 parser.add_argument('--findit-api-url',
372 help='Query findit results from this url.') 378 help='Query findit results from this url.')
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 **loop_args) 434 **loop_args)
429 435
430 logging.debug('Flushing ts_mon starting') 436 logging.debug('Flushing ts_mon starting')
431 ts_mon.flush() 437 ts_mon.flush()
432 logging.debug('Flushing ts_mon completed') 438 logging.debug('Flushing ts_mon completed')
433 return 0 if loop_results.success else 1 439 return 0 if loop_results.success else 1
434 440
435 441
436 if __name__ == '__main__': 442 if __name__ == '__main__':
437 sys.exit(main(sys.argv[1:])) 443 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698