mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
Merge branch 'staging' into v5.x
This commit is contained in:
commit
56d78415e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user