Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/Broadcast-fail-by-give-queue-kwargs #906

Merged
merged 2 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kombu/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Broadcast(Queue):

def __init__(self, name=None, queue=None, auto_delete=True,
exchange=None, alias=None, **kwargs):
queue = queue or 'bcast.{0}'.format(uuid())
queue = '{0}.{1}'.format(queue or 'bcast', uuid())
return super(Broadcast, self).__init__(
alias=alias or name,
queue=queue,
Expand Down
4 changes: 2 additions & 2 deletions t/unit/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def test_arguments(self):
assert q.exchange.type == 'fanout'

q = Broadcast('test_Broadcast', 'explicit_queue_name')
assert q.name == 'explicit_queue_name'
assert q.name.startswith('explicit_queue_name.')
assert q.exchange.name == 'test_Broadcast'

q2 = q(Mock())
assert q2.name == q.name
assert q2.name.split('.')[0] == q.name.split('.')[0]


class test_maybe_declare:
Expand Down