summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2023-06-04 03:18:43 +0200
committerRick Elrod <rick@elrod.me>2023-06-05 21:46:25 +0200
commit036f85cd80430a894ea0ccb3212184fe1b04ac07 (patch)
tree92a69676e3d6740cde1e5ef101d8e89f90942149
parentAdd management command to precreate partitioned tables (#14076) (diff)
downloadawx-036f85cd80430a894ea0ccb3212184fe1b04ac07.tar.xz
awx-036f85cd80430a894ea0ccb3212184fe1b04ac07.zip
Two silly internal cleanups
- Nix an unused function from run_dispatcher. This stopped being used in 558e92806b0e692939faf113029ad322960c7369 but was never removed. - Fix a typo in run_ws_heartbeat: hearbeat -> heartbeat that has existed since the beginning of this daemon. Signed-off-by: Rick Elrod <rick@elrod.me>
-rw-r--r--awx/main/management/commands/run_dispatcher.py5
-rw-r--r--awx/main/management/commands/run_ws_heartbeat.py4
2 files changed, 2 insertions, 7 deletions
diff --git a/awx/main/management/commands/run_dispatcher.py b/awx/main/management/commands/run_dispatcher.py
index 934836e9d6..d0279d4343 100644
--- a/awx/main/management/commands/run_dispatcher.py
+++ b/awx/main/management/commands/run_dispatcher.py
@@ -3,7 +3,6 @@
import logging
import yaml
-from django.conf import settings
from django.core.cache import cache as django_cache
from django.core.management.base import BaseCommand
from django.db import connection as django_connection
@@ -17,10 +16,6 @@ from awx.main.dispatch import periodic
logger = logging.getLogger('awx.main.dispatch')
-def construct_bcast_queue_name(common_name):
- return common_name + '_' + settings.CLUSTER_HOST_ID
-
-
class Command(BaseCommand):
help = 'Launch the task dispatcher'
diff --git a/awx/main/management/commands/run_ws_heartbeat.py b/awx/main/management/commands/run_ws_heartbeat.py
index 1cb4c8d028..854ce4b7ca 100644
--- a/awx/main/management/commands/run_ws_heartbeat.py
+++ b/awx/main/management/commands/run_ws_heartbeat.py
@@ -29,7 +29,7 @@ class Command(BaseCommand):
conn.notify('web_ws_heartbeat', self.construct_payload(action='offline'))
sys.exit(0)
- def do_hearbeat_loop(self):
+ def do_heartbeat_loop(self):
while True:
with pg_bus_conn() as conn:
logger.debug('Sending heartbeat')
@@ -42,4 +42,4 @@ class Command(BaseCommand):
# Note: We don't really try any reconnect logic to pg_notify here,
# just let supervisor restart if we fail.
- self.do_hearbeat_loop()
+ self.do_heartbeat_loop()