From 514ee88233de0f2ded727c513ce5a560d23a9ef7 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sun, 4 Jan 2026 03:19:54 +0100 Subject: [PATCH] Add getDescription() to all commands --- src/Command/AddCommand.php | 7 +++++++ src/Command/InfoCommand.php | 7 +++++++ src/Command/JobCommand.php | 7 +++++++ src/Command/RunCommand.php | 7 +++++++ src/Command/WorkerCommand.php | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/src/Command/AddCommand.php b/src/Command/AddCommand.php index f47320cd..dc68fcd0 100644 --- a/src/Command/AddCommand.php +++ b/src/Command/AddCommand.php @@ -12,6 +12,13 @@ class AddCommand extends Command { + /** + * @return string + */ + public static function getDescription(): string { + return 'Add a job to the queue.'; + } + /** * @inheritDoc */ diff --git a/src/Command/InfoCommand.php b/src/Command/InfoCommand.php index 5362136c..dac8a113 100644 --- a/src/Command/InfoCommand.php +++ b/src/Command/InfoCommand.php @@ -16,6 +16,13 @@ */ class InfoCommand extends Command { + /** + * @return string + */ + public static function getDescription(): string { + return 'Show queue status and available tasks.'; + } + /** * @var string|null */ diff --git a/src/Command/JobCommand.php b/src/Command/JobCommand.php index 9f7ce739..35e34fc3 100644 --- a/src/Command/JobCommand.php +++ b/src/Command/JobCommand.php @@ -18,6 +18,13 @@ */ class JobCommand extends Command { + /** + * @return string + */ + public static function getDescription(): string { + return 'Manage queued jobs.'; + } + protected QueuedJobsTable $QueuedJobs; /** diff --git a/src/Command/RunCommand.php b/src/Command/RunCommand.php index 8df947ce..990bb764 100644 --- a/src/Command/RunCommand.php +++ b/src/Command/RunCommand.php @@ -19,6 +19,13 @@ */ class RunCommand extends Command { + /** + * @return string + */ + public static function getDescription(): string { + return 'Run queue worker to process jobs.'; + } + /** * @var \Cake\Core\ContainerInterface */ diff --git a/src/Command/WorkerCommand.php b/src/Command/WorkerCommand.php index 5fa17f72..4e6f3242 100644 --- a/src/Command/WorkerCommand.php +++ b/src/Command/WorkerCommand.php @@ -17,6 +17,13 @@ */ class WorkerCommand extends Command { + /** + * @return string + */ + public static function getDescription(): string { + return 'Manage queue workers.'; + } + protected QueueProcessesTable $QueueProcesses; /**