| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2015 The Swarming Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Machine Provider agent for GCE instances.""" | 6 """Machine Provider agent for GCE instances.""" |
| 7 | 7 |
| 8 import base64 | 8 import base64 |
| 9 import datetime | 9 import datetime |
| 10 import httplib2 | 10 import httplib2 |
| 11 import json | 11 import json |
| 12 import logging | 12 import logging |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 if ack_ids: | 263 if ack_ids: |
| 264 pubsub.acknowledge(subscription, project, ack_ids) | 264 pubsub.acknowledge(subscription, project, ack_ids) |
| 265 if time.time() - start_time < 1: | 265 if time.time() - start_time < 1: |
| 266 # Iterate at most once per second (chosen arbitrarily). | 266 # Iterate at most once per second (chosen arbitrarily). |
| 267 time.sleep(1) | 267 time.sleep(1) |
| 268 | 268 |
| 269 | 269 |
| 270 if __name__ == '__main__': | 270 if __name__ == '__main__': |
| 271 sys.exit(main()) | 271 sys.exit(main()) |
| OLD | NEW |