OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 """Commit queue executable. | 5 """Commit queue executable. |
6 | 6 |
7 Reuse Rietveld and the Chromium Try Server to process and automatically commit | 7 Reuse Rietveld and the Chromium Try Server to process and automatically commit |
8 patches. | 8 patches. |
9 """ | 9 """ |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 pc.look_for_new_pending_commit() | 102 pc.look_for_new_pending_commit() |
103 pc.process_new_pending_commit() | 103 pc.process_new_pending_commit() |
104 pc.update_status() | 104 pc.update_status() |
105 pc.scan_results() | 105 pc.scan_results() |
106 delay = options.poll_interval - (time.time() - last_loop) | 106 delay = options.poll_interval - (time.time() - last_loop) |
107 if delay > 0: | 107 if delay > 0: |
108 # While waiting, let's sync. | 108 # While waiting, let's sync. |
109 pc.checkout.prepare() | 109 pc.checkout.prepare() |
110 delay = options.poll_interval - (time.time() - last_loop) | 110 delay = options.poll_interval - (time.time() - last_loop) |
111 if delay > 0: | 111 if delay > 0: |
112 logging.info('Next poll in %1.1f second(s)' % delay) | |
113 time.sleep(delay) | 112 time.sleep(delay) |
114 last_loop = time.time() | 113 last_loop = time.time() |
115 finally: | 114 finally: |
116 pc.save(db_path) | 115 pc.save(db_path) |
117 return 0 | 116 return 0 |
118 | 117 |
119 | 118 |
120 if __name__ == '__main__': | 119 if __name__ == '__main__': |
121 sys.exit(main()) | 120 sys.exit(main()) |
OLD | NEW |