diff --git a/awx/main/dispatch/__init__.py b/awx/main/dispatch/__init__.py index 841f9344ae..bff1329a7d 100644 --- a/awx/main/dispatch/__init__.py +++ b/awx/main/dispatch/__init__.py @@ -9,10 +9,6 @@ from django.conf import settings NOT_READY = ([], [], []) -if 'run_callback_receiver' in sys.argv: - logger = logging.getLogger('awx.main.commands.run_callback_receiver') -else: - logger = logging.getLogger('awx.main.dispatch') def get_local_queuename(): @@ -36,25 +32,6 @@ class PubSub(object): with self.conn.cursor() as cur: cur.execute('SELECT pg_notify(%s, %s);', (channel, payload)) - def get_event(self, select_timeout=0): - # poll the connection, then return one event, if we have one. Else - # return None. - select.select([self.conn], [], [], select_timeout) - self.conn.poll() - if self.conn.notifies: - return self.conn.notifies.pop(0) - - def get_events(self, select_timeout=0): - # Poll the connection and return all events, if there are any. Else - # return None. - select.select([self.conn], [], [], select_timeout) # redundant? - self.conn.poll() - events = [] - while self.conn.notifies: - events.append(self.conn.notifies.pop(0)) - if events: - return events - def events(self, select_timeout=5, yield_timeouts=False): while True: if select.select([self.conn], [], [], select_timeout) == NOT_READY: diff --git a/awx/main/dispatch/control.py b/awx/main/dispatch/control.py index 4565df17f5..a7c8ce78de 100644 --- a/awx/main/dispatch/control.py +++ b/awx/main/dispatch/control.py @@ -21,10 +21,6 @@ class Control(object): self.service = service self.queuename = host or get_local_queuename() - def publish(self, msg, conn, **kwargs): - # TODO: delete this method?? - raise RuntimeError("Publish called?!") - def status(self, *args, **kwargs): return self.control_with_reply('status', *args, **kwargs)