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

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

Issue 2185563002: Call sys.exit after logging threads (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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 logging.debug('Finished outer loop') 445 logging.debug('Finished outer loop')
446 446
447 logging.debug('Flushing ts_mon starting') 447 logging.debug('Flushing ts_mon starting')
448 ts_mon.flush() 448 ts_mon.flush()
449 logging.debug('Flushing ts_mon completed') 449 logging.debug('Flushing ts_mon completed')
450 return 0 if loop_results.success else 1 450 return 0 if loop_results.success else 1
451 451
452 452
453 if __name__ == '__main__': 453 if __name__ == '__main__':
454 logging.debug('Started main') 454 logging.debug('Started main')
455 sys.exit(main(sys.argv[1:])) 455 retcode = main(sys.argv[1:])
456 current_thread_descriptions = [t.name + (' (daemon)' if t.isDaemon() else '') 456 current_thread_descriptions = [t.name + (' (daemon)' if t.isDaemon() else '')
457 for t in threading.enumerate()] 457 for t in threading.enumerate()]
tandrii(chromium) 2016/07/26 11:27:23 consider skipping current thread.
Sergiy Byelozyorov 2016/07/26 14:15:13 Done.
458 logging.debug( 458 logging.debug(
459 'Leaving main. Threads: %s', ', '.join(current_thread_descriptions)) 459 'Leaving main. Threads: %s', ', '.join(current_thread_descriptions))
460 sys.exit(retcode)
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