Skip to content

Commit 620133d

Browse files
committed
change subscibe to blocking pop for redis
1 parent b5ef49d commit 620133d

File tree

7 files changed

+248
-322
lines changed

7 files changed

+248
-322
lines changed

AsyncComponent.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,12 @@ public function sendTask(AsyncTask $task)
4040

4141
/**
4242
* @param $queueName
43+
* @param bool $wait Wait for task
4344
* @return AsyncTask|bool
4445
*/
45-
public function receiveTask($queueName)
46+
public function receiveTask($queueName, $wait = false)
4647
{
47-
return $this->transport->receive($queueName);
48-
}
49-
50-
public function waitAndReceive($queueName) {
51-
return $this->transport->waitAndReceive($queueName);
48+
return $this->transport->receive($queueName, $wait);
5249
}
5350

5451
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"codeception/codeception": "2.0.*",
2222
"pdezwart/php-amqp": "dev-master",
2323
"yiisoft/yii2-redis": "*",
24-
"kriswallsmith/spork": "*"
24+
"kriswallsmith/spork": "dev-master"
2525
},
2626
"autoload": {
2727
"psr-4": {

0 commit comments

Comments
 (0)