Fix dispatcher run call and remove dispatch settin

* added back some code that was lost in the merge conflict
* remove dispatcher mock publish setting
This commit is contained in:
thedoubl3j
2026-01-20 14:38:54 -05:00
parent bb8ecc5919
commit d75fcc13f6
5 changed files with 7 additions and 10 deletions

View File

@@ -5,7 +5,6 @@ import time
from django_guid import set_guid
logger = logging.getLogger('awx.main.dispatch')

View File

@@ -62,5 +62,12 @@ class Command(BaseCommand):
print(yaml.dump(results, default_flow_style=False))
return
self.configure_dispatcher_logging()
# Close the connection, because the pg_notify broker will create new async connection
connection.close()
django_cache.close()
dispatcher_setup(get_dispatcherd_config(for_service=True))
run_service()
dispatcher_setup(get_dispatcherd_config(for_service=True))
run_service()

View File

@@ -7,9 +7,6 @@ from awx.settings.development import * # NOQA
# Some things make decisions based on settings.SETTINGS_MODULE, so this is done for that
SETTINGS_MODULE = 'awx.settings.development'
# Turn off task submission, because sqlite3 does not have pg_notify
DISPATCHER_MOCK_PUBLISH = True
# Use SQLite for unit tests instead of PostgreSQL. If the lines below are
# commented out, Django will create the test_awx-dev database in PostgreSQL to
# run unit tests.

View File

@@ -8,7 +8,6 @@ LOCAL_SETTINGS = (
'CACHES',
'DEBUG',
'NAMED_URL_GRAPH',
'DISPATCHER_MOCK_PUBLISH',
# Platform flags are managed by the platform flags system and have environment-specific defaults
'FEATURE_INDIRECT_NODE_COUNTING_ENABLED',
)

View File

@@ -416,11 +416,6 @@ EXECUTION_NODE_REMEDIATION_CHECKS = 60 * 30 # once every 30 minutes check if an
# Amount of time dispatcher will try to reconnect to database for jobs and consuming new work
DISPATCHER_DB_DOWNTIME_TOLERANCE = 40
# If you set this, nothing will ever be sent to pg_notify
# this is not practical to use, although periodic schedules may still run slugish but functional tasks
# sqlite3 based tests will use this
DISPATCHER_MOCK_PUBLISH = False
BROKER_URL = 'unix:///var/run/redis/redis.sock'
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
REDIS_BACKOFF_CAP = 1.0 # Maximum backoff delay in seconds for Redis retries