Skip to content

Commit

Permalink
Add exclusive argument to Queue
Browse files Browse the repository at this point in the history
  • Loading branch information
levsh committed Oct 8, 2024
1 parent d8a8c30 commit bfc4c1e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 39 deletions.
38 changes: 19 additions & 19 deletions locales/rmqaio.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-10-06 10:43+0300\n"
"POT-Creation-Date: 2024-10-08 19:33+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -15,75 +15,75 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"


#: ../rmqaio.py:116
#: ../rmqaio.py:119
msgid "%s (%s %s) retry(%s) in %s second(s)"
msgstr ""

#: ../rmqaio.py:295
#: ../rmqaio.py:298
msgid "%s unclosed"
msgstr ""

#: ../rmqaio.py:321
#: ../rmqaio.py:324
msgid "%s execute callback[tp=%s, name=%s, reraise=%s]"
msgstr ""

#: ../rmqaio.py:332
#: ../rmqaio.py:335
msgid "%s callback[tp=%s, name=%s, callback=%s] error"
msgstr ""

#: ../rmqaio.py:342
#: ../rmqaio.py:345
msgid "%s set callback[tp=%s, name=%s, callback=%s]"
msgstr ""

#: ../rmqaio.py:401
#: ../rmqaio.py:404
msgid "%s connection lost"
msgstr ""

#: ../rmqaio.py:424
#: ../rmqaio.py:427
msgid "%s connecting[timeout=%s]..."
msgstr ""

#: ../rmqaio.py:447
#: ../rmqaio.py:450
msgid "%s connected"
msgstr ""

#: ../rmqaio.py:499
#: ../rmqaio.py:502
msgid "%s close underlying connection"
msgstr ""

#: ../rmqaio.py:513
#: ../rmqaio.py:516
msgid "%s closed"
msgstr ""

#: ../rmqaio.py:573 ../rmqaio.py:784
#: ../rmqaio.py:576 ../rmqaio.py:787
msgid "%s close"
msgstr ""

#: ../rmqaio.py:601 ../rmqaio.py:752
#: ../rmqaio.py:604 ../rmqaio.py:755
msgid "Exchange[name='%s'] channel[%s] publish[routing_key='%s'] %s"
msgstr ""

#: ../rmqaio.py:663 ../rmqaio.py:854
#: ../rmqaio.py:666 ../rmqaio.py:859
msgid "%s close[delete=%s]"
msgstr ""

#: ../rmqaio.py:698 ../rmqaio.py:889
#: ../rmqaio.py:701 ../rmqaio.py:894
msgid "%s declare[restore=%s, force=%s]"
msgstr ""

#: ../rmqaio.py:950
#: ../rmqaio.py:956
msgid "Bind queue '%s' to exchange '%s' with routing_key '%s'"
msgstr ""

#: ../rmqaio.py:985
#: ../rmqaio.py:991
msgid "Unbind queue '%s' from exchange '%s' for routing_key '%s'"
msgstr ""

#: ../rmqaio.py:1048
#: ../rmqaio.py:1054
msgid "%s consuming"
msgstr ""

#: ../rmqaio.py:1074
#: ../rmqaio.py:1080
msgid "%s stop consuming"
msgstr ""

Binary file modified locales/ru/LC_MESSAGES/rmqaio.mo
Binary file not shown.
40 changes: 20 additions & 20 deletions locales/ru/LC_MESSAGES/rmqaio.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2024-10-06 10:43+0300\n"
"PO-Revision-Date: 2024-10-06 10:43+0300\n"
"POT-Creation-Date: 2024-10-08 19:33+0300\n"
"PO-Revision-Date: 2024-10-08 19:33+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru\n"
Expand All @@ -16,75 +16,75 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n"

#: ../rmqaio.py:116
#: ../rmqaio.py:119
msgid "%s (%s %s) retry(%s) in %s second(s)"
msgstr "%s (%s %s) повтор(%s) через %s секунд(у)"

#: ../rmqaio.py:295
#: ../rmqaio.py:298
msgid "%s unclosed"
msgstr "%s не закрыто"

#: ../rmqaio.py:321
#: ../rmqaio.py:324
msgid "%s execute callback[tp=%s, name=%s, reraise=%s]"
msgstr "%s выполняю callback[tp=%s, name=%s, reraise=%s]"

#: ../rmqaio.py:332
#: ../rmqaio.py:335
msgid "%s callback[tp=%s, name=%s, callback=%s] error"
msgstr "%s ошибка выполнения callback[tp=%s, name=%s, callback=%s]"

#: ../rmqaio.py:342
#: ../rmqaio.py:345
msgid "%s set callback[tp=%s, name=%s, callback=%s]"
msgstr "%s устанавливаю callback[tp=%s, name=%s, callback=%s]"

#: ../rmqaio.py:401
#: ../rmqaio.py:404
msgid "%s connection lost"
msgstr "%s соединение потеряно"

#: ../rmqaio.py:424
#: ../rmqaio.py:427
msgid "%s connecting[timeout=%s]..."
msgstr "%s подключаюсь[тайм-аут=%s]..."

#: ../rmqaio.py:447
#: ../rmqaio.py:450
msgid "%s connected"
msgstr "%s подключено"

#: ../rmqaio.py:499
#: ../rmqaio.py:502
msgid "%s close underlying connection"
msgstr "%s закрываю внутреннее соединение"

#: ../rmqaio.py:513
#: ../rmqaio.py:516
msgid "%s closed"
msgstr "%s закрыто"

#: ../rmqaio.py:573 ../rmqaio.py:784
#: ../rmqaio.py:576 ../rmqaio.py:787
msgid "%s close"
msgstr "%s закрываю"

#: ../rmqaio.py:601 ../rmqaio.py:752
#: ../rmqaio.py:604 ../rmqaio.py:755
msgid "Exchange[name='%s'] channel[%s] publish[routing_key='%s'] %s"
msgstr "Exchange[name='%s'] канал[%s] публикую[routing_key='%s'] %s"

#: ../rmqaio.py:663 ../rmqaio.py:854
#: ../rmqaio.py:666 ../rmqaio.py:859
msgid "%s close[delete=%s]"
msgstr "%s закрываю[delete=%s]"

#: ../rmqaio.py:698 ../rmqaio.py:889
#: ../rmqaio.py:701 ../rmqaio.py:894
msgid "%s declare[restore=%s, force=%s]"
msgstr "%s объявляю[restore=%s, force=%s]"

#: ../rmqaio.py:950
#: ../rmqaio.py:956
msgid "Bind queue '%s' to exchange '%s' with routing_key '%s'"
msgstr "Подключаю очередь '%s' к exchange '%s' с ключом маршрутизации '%s'"

#: ../rmqaio.py:985
#: ../rmqaio.py:991
msgid "Unbind queue '%s' from exchange '%s' for routing_key '%s'"
msgstr "Отключаю очередь '%s' от exchange '%s' для ключа маршрутизации '%s'"

#: ../rmqaio.py:1048
#: ../rmqaio.py:1054
msgid "%s consuming"
msgstr "%s слушаю"

#: ../rmqaio.py:1074
#: ../rmqaio.py:1080
msgid "%s stop consuming"
msgstr "%s перестал слушать"

Expand Down
3 changes: 3 additions & 0 deletions rmqaio.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ class Queue:
name: Queue name.
type: Queue [type](https://www.rabbitmq.com/docs/queues#distributed).
durable: Queue durable [option](https://www.rabbitmq.com/docs/queues#durability).
exclusive: Queue exclusive [option](https://www.rabbitmq.com/docs/queues#exclusive-queues).
auto_delete: Queue auto-delete option.
prefetch_count: RabbitMQ channel [prefecth count](https://www.rabbitmq.com/docs/confirms#channel-qos-prefetch).
max_priority: Max [priority](https://www.rabbitmq.com/docs/priority) for `QueueType.CLASSIC` queue.
Expand All @@ -813,6 +814,7 @@ class Queue:
name: str
type: QueueType = QueueType.CLASSIC
durable: bool = False
exclusive: bool = False
auto_delete: bool = False
prefetch_count: int | None = 1
max_priority: int | None = None
Expand Down Expand Up @@ -905,6 +907,7 @@ async def fn():
await channel.queue_declare(
self.name,
durable=self.durable,
exclusive=self.exclusive,
auto_delete=self.auto_delete,
arguments=arguments,
timeout=timeout or self.timeout,
Expand Down

0 comments on commit bfc4c1e

Please sign in to comment.