uawdijnntqw1x1x1
IP : 216.73.216.107
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
yiisoft
/
yii2-queue
/
src
/
.
/
cli
/
InfoAction.php
/
/
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\queue\cli; use yii\base\NotSupportedException; use yii\helpers\Console; use yii\queue\interfaces\DelayedCountInterface; use yii\queue\interfaces\DoneCountInterface; use yii\queue\interfaces\ReservedCountInterface; use yii\queue\interfaces\StatisticsProviderInterface; use yii\queue\interfaces\WaitingCountInterface; /** * Info about queue status. * * @author Kalmer Kaurson <kalmerkaurson@gmail.com> */ class InfoAction extends Action { /** * @var Queue */ public $queue; /** * Info about queue status. */ public function run() { if (!($this->queue instanceof StatisticsProviderInterface)) { throw new NotSupportedException('Queue does not support ' . StatisticsProviderInterface::class); } $this->controller->stdout('Jobs' . PHP_EOL, Console::FG_GREEN); $statisticsProvider = $this->queue->getStatisticsProvider(); if ($statisticsProvider instanceof WaitingCountInterface) { $this->controller->stdout('- waiting: ', Console::FG_YELLOW); $this->controller->stdout($statisticsProvider->getWaitingCount() . PHP_EOL); } if ($statisticsProvider instanceof DelayedCountInterface) { $this->controller->stdout('- delayed: ', Console::FG_YELLOW); $this->controller->stdout($statisticsProvider->getDelayedCount() . PHP_EOL); } if ($statisticsProvider instanceof ReservedCountInterface) { $this->controller->stdout('- reserved: ', Console::FG_YELLOW); $this->controller->stdout($statisticsProvider->getReservedCount() . PHP_EOL); } if ($statisticsProvider instanceof DoneCountInterface) { $this->controller->stdout('- done: ', Console::FG_YELLOW); $this->controller->stdout($statisticsProvider->getDoneCount() . PHP_EOL); } } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/yiisoft/yii2-queue/src/./cli/InfoAction.php