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 """Swarming bot main process. | 5 """Swarming bot main process. |
6 | 6 |
7 This is the program that communicates with the Swarming server, ensures the code | 7 This is the program that communicates with the Swarming server, ensures the code |
8 is always up to date and executes a child process to run tasks and upload | 8 is always up to date and executes a child process to run tasks and upload |
9 results back. | 9 results back. |
10 | 10 |
11 It manages self-update and rebooting the host in case of problems. | 11 It manages self-update and rebooting the host in case of problems. |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 | 702 |
703 error = None | 703 error = None |
704 if len(args) != 0: | 704 if len(args) != 0: |
705 error = 'Unexpected arguments: %s' % args | 705 error = 'Unexpected arguments: %s' % args |
706 try: | 706 try: |
707 return run_bot(error) | 707 return run_bot(error) |
708 finally: | 708 finally: |
709 call_hook(bot.Bot(None, None, None, None, os.path.dirname(THIS_FILE), None), | 709 call_hook(bot.Bot(None, None, None, None, os.path.dirname(THIS_FILE), None), |
710 'on_bot_shutdown') | 710 'on_bot_shutdown') |
711 logging.info('main() returning') | 711 logging.info('main() returning') |
OLD | NEW |