Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3496)

Unified Diff: appengine/swarming/swarming_bot/bot_code/bot_main.py

Issue 2969513002: Add a default Isolate gRPC proxy in config (Closed)
Patch Set: Fix problem in tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/server/bot_code.py ('k') | appengine/swarming/swarming_bot/bot_code/bot_main_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_bot/bot_code/bot_main.py
diff --git a/appengine/swarming/swarming_bot/bot_code/bot_main.py b/appengine/swarming/swarming_bot/bot_code/bot_main.py
index c24ebc01e65e006351aab43744b08a3ee3bffba6..21727424d7636f52ac41b7a8975420f2f1a4ecf9 100644
--- a/appengine/swarming/swarming_bot/bot_code/bot_main.py
+++ b/appengine/swarming/swarming_bot/bot_code/bot_main.py
@@ -516,7 +516,7 @@ def get_bot(config):
attributes = get_attributes(
bot.Bot(
remote_client.createRemoteClient(config['server'],
- None, config['is_grpc']),
+ None, config.get('swarming_grpc_proxy')),
attributes,
config['server'],
config['server_version'],
@@ -530,7 +530,7 @@ def get_bot(config):
remote_client.createRemoteClient(
config['server'],
lambda: _get_authentication_headers(botobj),
- config['is_grpc']),
+ config.get('swarming_grpc_proxy')),
attributes,
config['server'],
config['server_version'],
@@ -704,7 +704,7 @@ def _run_bot_inner(arg_error, quit_bit):
- bot process shuts down (this includes a signal is received)
"""
config = get_config()
- if config['enable_ts_monitoring']:
+ if config.get('enable_ts_monitoring'):
_init_ts_mon()
try:
# First thing is to get an arbitrary url. This also ensures the network is
@@ -713,7 +713,7 @@ def _run_bot_inner(arg_error, quit_bit):
# up" the network; if there's something seriously wrong, the handshake will
# fail and we'll handle it there.
remote = remote_client.createRemoteClient(config['server'], None,
- config['is_grpc'])
+ config.get('swarming_grpc_proxy'))
remote.ping()
except Exception:
# url_read() already traps pretty much every exceptions. This except
@@ -1187,8 +1187,6 @@ def get_config():
except (IOError, OSError, TypeError, ValueError):
logging.exception('Invalid config.json!')
config = {
- 'enable_ts_monitoring': False,
- 'is_grpc': False,
'server': '',
'server_version': 'version1',
}
« no previous file with comments | « appengine/swarming/server/bot_code.py ('k') | appengine/swarming/swarming_bot/bot_code/bot_main_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698