Skip to content

Commit cf253ff

Browse files
committed
Merge branch 'develop' into staging
2 parents 9dad302 + c2af169 commit cf253ff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bench/config/supervisor.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from bench.bench import Bench
1313
from bench.config.common_site_config import (
1414
compute_max_requests_jitter,
15+
get_config,
1516
get_default_max_requests,
1617
get_gunicorn_workers,
1718
update_config,
@@ -73,6 +74,7 @@ def generate_supervisor_config(bench_path, user=None, yes=False, skip_redis=Fals
7374

7475
update_config({"restart_supervisor_on_update": True}, bench_path=bench_path)
7576
update_config({"restart_systemd_on_update": False}, bench_path=bench_path)
77+
sync_socketio_port(bench_path)
7678

7779

7880
def get_supervisord_conf():
@@ -90,6 +92,16 @@ def get_supervisord_conf():
9092
return possibility
9193

9294

95+
def sync_socketio_port(bench_path):
96+
# Backward compatbility: always keep redis_cache and redis_socketio port same
97+
common_config = get_config(bench_path=bench_path)
98+
99+
socketio_port = common_config.get("redis_socketio")
100+
cache_port = common_config.get("redis_cache")
101+
if socketio_port and socketio_port != cache_port:
102+
update_config({"redis_socketio": cache_port})
103+
104+
93105
def can_enable_multi_queue_consumption(bench_path: str) -> bool:
94106
try:
95107
from semantic_version import Version

0 commit comments

Comments
 (0)