Skip to content

Commit

Permalink
Bump nsq/nsq up to 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
grachevko committed Jun 9, 2021
1 parent b3719b2 commit 5eea27c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": "^8.0.1",
"ext-json": "*",
"nsq/nsq": "^0.5.1",
"nsq/nsq": "^0.6.1",
"symfony/framework-bundle": "^5.0",
"symfony/messenger": "^5.0"
},
Expand Down
6 changes: 1 addition & 5 deletions src/Messenger/NsqSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ public function send(Envelope $envelope): Envelope
$delayStamp = $envelope->last(DelayStamp::class);
$delay = null !== $delayStamp ? $delayStamp->getDelay() : null;

if (null === $delay) {
$promise = $producer->publish($this->topic, $encodedMessage);
} else {
$promise = $producer->defer($this->topic, $encodedMessage, $delay);
}
$promise = $producer->publish($this->topic, $encodedMessage, $delay);

wait($promise);

Expand Down

0 comments on commit 5eea27c

Please sign in to comment.