mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
reload-clients: Ensure that Smokescreen does not interfere with reloads.
When run from cron, reload-server (and thus reload-clients) picks up
the `HTTP_proxy` environment variable, which redirects HTTP requests
through Smokescreen -- which prevents localhost requests. This
results in clients never getting sent reload events.
Explicitly unset proxies when talking to localhost in reload-clients.
(cherry picked from commit bef864251b)
This commit is contained in:
committed by
Tim Abbott
parent
9baccbce5e
commit
6dd8e003da
@@ -89,6 +89,7 @@ for port in get_tornado_ports(config_file):
|
|||||||
f"http://127.0.0.1:{port}/api/internal/web_reload_clients",
|
f"http://127.0.0.1:{port}/api/internal/web_reload_clients",
|
||||||
data={"client_count": reload_rate * SECONDS_PER_BATCH, "secret": shared_secret},
|
data={"client_count": reload_rate * SECONDS_PER_BATCH, "secret": shared_secret},
|
||||||
timeout=5,
|
timeout=5,
|
||||||
|
proxies={"http": ""}, # Make sure we don't go through Smokescreen
|
||||||
)
|
)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
shard_total += resp.json()["sent_events"]
|
shard_total += resp.json()["sent_events"]
|
||||||
|
|||||||
Reference in New Issue
Block a user