Skip to content

Commit c672a40

Browse files
authored
Merge pull request #1 from sagacorp/adapt-to-symfony-process
Update yii2 queue
2 parents d2e3cd4 + 1cef079 commit c672a40

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"yiisoft/yii2-queue": "~2.0.2",
16+
"yiisoft/yii2-queue": "~2.3.2",
1717
"yiisoft/yii2-httpclient": "~2.0",
1818
"nesbot/carbon": "^2.40"
1919
},

src/Queue.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use sagacorp\queue\azure\service\ServiceBus;
88
use yii\base\NotSupportedException;
99
use yii\di\Instance;
10-
use yii\queue\cli\LoopInterface;
1110

1211
/**
1312
* Azure bus Queue.
@@ -50,8 +49,8 @@ public function init(): void
5049
public function run(bool $repeat, int $timeout = 30): ?int
5150
{
5251
return $this->runWorker(
53-
function (LoopInterface $loop) use ($repeat, $timeout) {
54-
while ($loop->canContinue()) {
52+
function (callable $canContinue) use ($repeat, $timeout) {
53+
while ($canContinue()) {
5554
$message = $this->serviceBus->receiveMessage(ServiceBus::PEEK_LOCK, $timeout);
5655

5756
if ($message !== null && $message->brokerProperties !== null) {

0 commit comments

Comments
 (0)