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

Side by Side Diff: scheduler/monitor_db.py

Issue 6551020: Merge remote branch 'autotest-upstream/master' into try-box1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « client/tests/tiobench/makefile.patch ('k') | scheduler/status_server.py » ('j') | 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/python -u 1 #!/usr/bin/python -u
2 2
3 """ 3 """
4 Autotest scheduler 4 Autotest scheduler
5 """ 5 """
6 6
7 7
8 import common 8 import common
9 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal 9 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal
10 import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback, urllib 10 import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback, urllib
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 _testing_mode = True 152 _testing_mode = True
153 153
154 server = status_server.StatusServer() 154 server = status_server.StatusServer()
155 server.start() 155 server.start()
156 156
157 try: 157 try:
158 initialize() 158 initialize()
159 dispatcher = Dispatcher() 159 dispatcher = Dispatcher()
160 dispatcher.initialize(recover_hosts=options.recover_hosts) 160 dispatcher.initialize(recover_hosts=options.recover_hosts)
161 161
162 while not _shutdown: 162 while not _shutdown and not server._shutdown_scheduler:
163 dispatcher.tick() 163 dispatcher.tick()
164 time.sleep(scheduler_config.config.tick_pause_sec) 164 time.sleep(scheduler_config.config.tick_pause_sec)
165 except: 165 except:
166 email_manager.manager.log_stacktrace( 166 email_manager.manager.log_stacktrace(
167 "Uncaught exception; terminating monitor_db") 167 "Uncaught exception; terminating monitor_db")
168 168
169 email_manager.manager.send_queued_emails() 169 email_manager.manager.send_queued_emails()
170 server.shutdown() 170 server.shutdown()
171 _drone_manager.shutdown() 171 _drone_manager.shutdown()
172 _db.disconnect() 172 _db.disconnect()
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 paired_process = self._paired_with_monitor().get_process() 2609 paired_process = self._paired_with_monitor().get_process()
2610 _drone_manager.write_lines_to_file( 2610 _drone_manager.write_lines_to_file(
2611 failed_file, ['Archiving failed with exit code %s' 2611 failed_file, ['Archiving failed with exit code %s'
2612 % self.monitor.exit_code()], 2612 % self.monitor.exit_code()],
2613 paired_with_process=paired_process) 2613 paired_with_process=paired_process)
2614 self._set_all_statuses(self._final_status()) 2614 self._set_all_statuses(self._final_status())
2615 2615
2616 2616
2617 if __name__ == '__main__': 2617 if __name__ == '__main__':
2618 main() 2618 main()
OLDNEW
« no previous file with comments | « client/tests/tiobench/makefile.patch ('k') | scheduler/status_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698