改名
This commit is contained in:
+5
-6
@@ -59,14 +59,13 @@ class Queue extends \Snowflake\Process\Process
|
|||||||
Timer::tick(50, function () {
|
Timer::tick(50, function () {
|
||||||
$redis = Snowflake::app()->getRedis();
|
$redis = Snowflake::app()->getRedis();
|
||||||
try {
|
try {
|
||||||
$data = $redis->zRevRange(Waiting::QUEUE_WAITING, 0, 20);
|
$params = $redis->zRevRange(Waiting::QUEUE_WAITING, 0, 20);
|
||||||
if (empty($data)) {
|
if (empty($params)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
Coroutine::create(function ($params) {
|
|
||||||
$this->scheduler($params);
|
|
||||||
}, $data);
|
|
||||||
}
|
}
|
||||||
|
Coroutine::create(function () use ($params) {
|
||||||
|
$this->scheduler($params);
|
||||||
|
});
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->application->error($exception->getMessage());
|
$this->application->error($exception->getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user