This commit is contained in:
2020-09-11 14:51:40 +08:00
parent 4c144b24c7
commit cb52de44ff
+1 -4
View File
@@ -59,12 +59,9 @@ class Queue extends \Snowflake\Process\Process
Timer::tick(50, function () {
$redis = Snowflake::app()->getRedis();
try {
if ($this->shutdown) {
return;
}
$data = $redis->zRevRange(Waiting::QUEUE_WAITING, 0, 20);
if (empty($data)) {
Coroutine::sleep(0.05);
return;
} else {
Coroutine::create(function ($params) {
$this->scheduler($params);