Skip to content

Commit 3e5ea3d

Browse files
committed
Separate queued from scheduled.
1 parent 52e6674 commit 3e5ea3d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Command/InfoCommand.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ public function execute(Arguments $args, ConsoleIo $io) {
7676
$io->hr();
7777
$io->out();
7878

79-
$QueuedJobs = $this->getTableLocator()->get('Queue.QueuedJobs');
80-
$QueueProcesses = $this->getTableLocator()->get('Queue.QueueProcesses');
79+
/** @var \Queue\Model\Table\QueuedJobsTable $QueuedJobs */
80+
$QueuedJobs = $this->fetchTable('Queue.QueuedJobs');
81+
$QueueProcesses = $this->fetchTable('Queue.QueueProcesses');
8182

8283
$io->out('Total unfinished jobs: ' . $QueuedJobs->getLength());
8384
$status = $QueueProcesses->status();
@@ -96,6 +97,11 @@ public function execute(Arguments $args, ConsoleIo $io) {
9697
$io->out(' - ' . str_pad($type, 20, ' ', STR_PAD_RIGHT) . ': ' . $QueuedJobs->getLength($type));
9798
}
9899

100+
$io->out();
101+
102+
$scheduled = $QueuedJobs->getScheduledStats()->count();
103+
$io->out('Jobs currently scheduled to run in the future: ' . $scheduled);
104+
99105
$io->out();
100106
$io->hr();
101107
$io->out();

0 commit comments

Comments
 (0)