Skip to content

Commit

Permalink
Merge pull request #50 from cloudblue/lite-21143-fix-dead-letter-comm…
Browse files Browse the repository at this point in the history
…ands

LITE-21143 Fix cqrs_dead_letters commands
  • Loading branch information
net-free authored Nov 19, 2021
2 parents 78c8d59 + 47aca0d commit e317790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dj_cqrs/management/commands/cqrs_dead_letters.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def handle(self, *args, **options):
self.check_transport()
channel, connection = self.init_broker()

queue_name, dead_letter_queue_name = RabbitMQTransportService.get_consumer_settings()
queue_name, dead_letter_queue_name, *_ = RabbitMQTransportService.get_consumer_settings()
dead_letters_queue = RabbitMQTransportService.declare_queue(
channel, dead_letter_queue_name,
)
Expand Down Expand Up @@ -80,7 +80,7 @@ def init_broker(self):
host, port, creds, exchange,
)

queue_name, dead_letter_queue_name = RabbitMQTransportService.get_consumer_settings()
queue_name, dead_letter_queue_name, *_ = RabbitMQTransportService.get_consumer_settings()
RabbitMQTransportService.declare_queue(channel, queue_name)
RabbitMQTransportService.declare_queue(channel, dead_letter_queue_name)
for cqrs_id, _ in ReplicaRegistry.models.items():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands/test_dead_letters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_dump(capsys, mocker):
mocker.patch.object(
RabbitMQTransport,
'_get_consumer_settings',
return_value=('queue', 'dead_letters_queue'),
return_value=('queue', 'dead_letters_queue', 0),
)
mocker.patch.object(
RabbitMQTransport,
Expand Down

0 comments on commit e317790

Please sign in to comment.