fix brop must in same slot error (#1144)

* fixed not Brpop in same slot

* fixed not Brpop in same slot
This commit is contained in:
york 2020-02-02 23:05:06 +08:00 committed by GitHub
parent e1dcfaef4b
commit f2970e81f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -778,7 +778,9 @@ class Channel(virtual.Channel):
def _q_for_pri(self, queue, pri):
pri = self.priority(pri)
return '%s%s%s' % ((queue, self.sep, pri) if pri else (queue, '', ''))
if pri:
return "{{{}}}{}{}".format(queue, self.sep, pri)
return queue
def priority(self, n):
steps = self.priority_steps