mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
replace janky unique channel name w/ uuid
* postgres notify/listen channel names have size limitations as well as character limitations. Respect those limitations while at the same time generate a unique channel name.
This commit is contained in:
parent
12158bdcba
commit
7f2e1d46bc
@ -1,5 +1,5 @@
|
||||
import logging
|
||||
import string
|
||||
import uuid
|
||||
import random
|
||||
import json
|
||||
|
||||
@ -29,8 +29,7 @@ class Control(object):
|
||||
|
||||
@classmethod
|
||||
def generate_reply_queue_name(cls):
|
||||
letters = string.ascii_lowercase
|
||||
return 'reply_to_{}'.format(''.join(random.choice(letters) for i in range(8)))
|
||||
return f"reply_to_{str(uuid.uuid4()).replace('-','_')}"
|
||||
|
||||
def control_with_reply(self, command, timeout=5):
|
||||
logger.warn('checking {} {} for {}'.format(self.service, command, self.queuename))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user