e
This commit is contained in:
+1
-4
@@ -59,12 +59,9 @@ class Queue extends \Snowflake\Process\Process
|
|||||||
Timer::tick(50, function () {
|
Timer::tick(50, function () {
|
||||||
$redis = Snowflake::app()->getRedis();
|
$redis = Snowflake::app()->getRedis();
|
||||||
try {
|
try {
|
||||||
if ($this->shutdown) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$data = $redis->zRevRange(Waiting::QUEUE_WAITING, 0, 20);
|
$data = $redis->zRevRange(Waiting::QUEUE_WAITING, 0, 20);
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
Coroutine::sleep(0.05);
|
return;
|
||||||
} else {
|
} else {
|
||||||
Coroutine::create(function ($params) {
|
Coroutine::create(function ($params) {
|
||||||
$this->scheduler($params);
|
$this->scheduler($params);
|
||||||
|
|||||||
Reference in New Issue
Block a user