| OLD | NEW |
| 1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be 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 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 | 65 |
| 66 # Whitelist of files that can be present in the bot's directory. Anything else | 66 # Whitelist of files that can be present in the bot's directory. Anything else |
| 67 # will be forcibly deleted on startup! Note that 'w' (work) is not in this list, | 67 # will be forcibly deleted on startup! Note that 'w' (work) is not in this list, |
| 68 # as we want it to be deleted on startup. | 68 # as we want it to be deleted on startup. |
| 69 # See | 69 # See |
| 70 # https://github.com/luci/luci-py/tree/master/appengine/swarming/doc/LifeOfABot.
md | 70 # https://github.com/luci/luci-py/tree/master/appengine/swarming/doc/LifeOfABot.
md |
| 71 # for more details. | 71 # for more details. |
| 72 PASSLIST = ( | 72 PASSLIST = ( |
| 73 '*-cacert.pem', | 73 '*-cacert.pem', |
| 74 'c', |
| 74 'cipd_cache', | 75 'cipd_cache', |
| 75 'isolated_cache', | 76 'isolated_cache', |
| 76 'logs', | 77 'logs', |
| 77 'README', | 78 'README', |
| 78 'README.md', | 79 'README.md', |
| 79 'swarming.lck', | 80 'swarming.lck', |
| 80 'swarming_bot.1.zip', | 81 'swarming_bot.1.zip', |
| 81 'swarming_bot.2.zip', | 82 'swarming_bot.2.zip', |
| 82 'swarming_bot.zip', | 83 'swarming_bot.zip', |
| 83 ) | 84 ) |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 | 1081 |
| 1081 error = None | 1082 error = None |
| 1082 if len(args) != 0: | 1083 if len(args) != 0: |
| 1083 error = 'Unexpected arguments: %s' % args | 1084 error = 'Unexpected arguments: %s' % args |
| 1084 try: | 1085 try: |
| 1085 return run_bot(error) | 1086 return run_bot(error) |
| 1086 finally: | 1087 finally: |
| 1087 call_hook( | 1088 call_hook( |
| 1088 bot.Bot(None, None, None, None, base_dir, None), 'on_bot_shutdown') | 1089 bot.Bot(None, None, None, None, base_dir, None), 'on_bot_shutdown') |
| 1089 logging.info('main() returning') | 1090 logging.info('main() returning') |
| OLD | NEW |