mirror of
https://github.com/ansible/awx.git
synced 2026-04-07 02:59:21 -02:30
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:
@@ -5,7 +5,6 @@ import time
|
|||||||
|
|
||||||
from django_guid import set_guid
|
from django_guid import set_guid
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('awx.main.dispatch')
|
logger = logging.getLogger('awx.main.dispatch')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -62,5 +62,12 @@ class Command(BaseCommand):
|
|||||||
print(yaml.dump(results, default_flow_style=False))
|
print(yaml.dump(results, default_flow_style=False))
|
||||||
return
|
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))
|
dispatcher_setup(get_dispatcherd_config(for_service=True))
|
||||||
run_service()
|
run_service()
|
||||||
|
|||||||
@@ -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
|
# Some things make decisions based on settings.SETTINGS_MODULE, so this is done for that
|
||||||
SETTINGS_MODULE = 'awx.settings.development'
|
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
|
# 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
|
# commented out, Django will create the test_awx-dev database in PostgreSQL to
|
||||||
# run unit tests.
|
# run unit tests.
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ LOCAL_SETTINGS = (
|
|||||||
'CACHES',
|
'CACHES',
|
||||||
'DEBUG',
|
'DEBUG',
|
||||||
'NAMED_URL_GRAPH',
|
'NAMED_URL_GRAPH',
|
||||||
'DISPATCHER_MOCK_PUBLISH',
|
|
||||||
# Platform flags are managed by the platform flags system and have environment-specific defaults
|
# Platform flags are managed by the platform flags system and have environment-specific defaults
|
||||||
'FEATURE_INDIRECT_NODE_COUNTING_ENABLED',
|
'FEATURE_INDIRECT_NODE_COUNTING_ENABLED',
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
# Amount of time dispatcher will try to reconnect to database for jobs and consuming new work
|
||||||
DISPATCHER_DB_DOWNTIME_TOLERANCE = 40
|
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'
|
BROKER_URL = 'unix:///var/run/redis/redis.sock'
|
||||||
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
|
REDIS_RETRY_COUNT = 3 # Number of retries for Redis connection errors
|
||||||
REDIS_BACKOFF_CAP = 1.0 # Maximum backoff delay in seconds for Redis retries
|
REDIS_BACKOFF_CAP = 1.0 # Maximum backoff delay in seconds for Redis retries
|
||||||
|
|||||||
Reference in New Issue
Block a user