mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
remove dead code
This commit is contained in:
parent
db7f0f9421
commit
12158bdcba
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user