OLD | NEW |
1 # Copyright 2013 The Swarming Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Runs a Swarming task. | 5 """Runs a Swarming task. |
6 | 6 |
7 Downloads all the necessary files to run the task, executes the command and | 7 Downloads all the necessary files to run the task, executes the command and |
8 streams results back to the Swarming server. | 8 streams results back to the Swarming server. |
9 | 9 |
10 The process exit code is 0 when the task was executed, even if the task itself | 10 The process exit code is 0 when the task was executed, even if the task itself |
11 failed. If there's any failure in the setup or teardown, like invalid packet | 11 failed. If there's any failure in the setup or teardown, like invalid packet |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 if options.start > now: | 513 if options.start > now: |
514 options.start = now | 514 options.start = now |
515 | 515 |
516 try: | 516 try: |
517 load_and_run( | 517 load_and_run( |
518 options.in_file, remote, options.cost_usd_hour, options.start, | 518 options.in_file, remote, options.cost_usd_hour, options.start, |
519 options.out_file, options.min_free_space_mib) | 519 options.out_file, options.min_free_space_mib) |
520 return 0 | 520 return 0 |
521 finally: | 521 finally: |
522 logging.info('quitting') | 522 logging.info('quitting') |
OLD | NEW |