diff --git a/awx/main/dispatch/config.py b/awx/main/dispatch/config.py index 7e0252c9bc..221ef1c698 100644 --- a/awx/main/dispatch/config.py +++ b/awx/main/dispatch/config.py @@ -25,7 +25,7 @@ def get_dispatcherd_config(for_service: bool = False, mock_publish: bool = False "version": 2, "service": { "pool_kwargs": { - "min_workers": settings.JOB_EVENT_WORKERS, + "min_workers": settings.DISPATCHER_MIN_WORKERS, "max_workers": max_workers, # This must be less than max_workers to make sense, which is usually 4 # With reserve of 1, after a burst of tasks, load needs to down to 4-1=3 diff --git a/awx/main/tests/functional/management/test_dispatcherd.py b/awx/main/tests/functional/management/test_dispatcherd.py index 92f1d208d9..ded1ab8c52 100644 --- a/awx/main/tests/functional/management/test_dispatcherd.py +++ b/awx/main/tests/functional/management/test_dispatcherd.py @@ -8,7 +8,7 @@ from awx.main.management.commands.dispatcherd import _hash_config def test_dispatcherd_config_hash_is_stable(settings, monkeypatch): monkeypatch.setenv('AWX_COMPONENT', 'dispatcher') settings.CLUSTER_HOST_ID = 'test-node' - settings.JOB_EVENT_WORKERS = 1 + settings.DISPATCHER_MIN_WORKERS = 1 settings.DISPATCHER_SCHEDULE = {} config_one = get_dispatcherd_config(for_service=True) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 8a67da9e31..77dc117d29 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -215,6 +215,9 @@ LOCAL_STDOUT_EXPIRE_TIME = 2592000 # events into the database JOB_EVENT_WORKERS = 4 +# Minimum number of workers for the dispatcher (dispatcherd) process pool +DISPATCHER_MIN_WORKERS = 4 + # The number of seconds to buffer callback receiver bulk # writes in memory before flushing via JobEvent.objects.bulk_create() JOB_EVENT_BUFFER_SECONDS = 1