2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 09:02:10 +00:00

Merge branch 'develop' into staging

This commit is contained in:
Ankush Menat 2023-09-06 12:02:27 +05:30
commit cf253fff84

View File

@ -12,6 +12,7 @@ from bench.app import use_rq
from bench.bench import Bench
from bench.config.common_site_config import (
compute_max_requests_jitter,
get_config,
get_default_max_requests,
get_gunicorn_workers,
update_config,
@ -73,6 +74,7 @@ def generate_supervisor_config(bench_path, user=None, yes=False, skip_redis=Fals
update_config({"restart_supervisor_on_update": True}, bench_path=bench_path)
update_config({"restart_systemd_on_update": False}, bench_path=bench_path)
sync_socketio_port(bench_path)
def get_supervisord_conf():
@ -90,6 +92,16 @@ def get_supervisord_conf():
return possibility
def sync_socketio_port(bench_path):
# Backward compatbility: always keep redis_cache and redis_socketio port same
common_config = get_config(bench_path=bench_path)
socketio_port = common_config.get("redis_socketio")
cache_port = common_config.get("redis_cache")
if socketio_port and socketio_port != cache_port:
update_config({"redis_socketio": cache_port})
def can_enable_multi_queue_consumption(bench_path: str) -> bool:
try:
from semantic_version import Version