diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b5041c..b510498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +2.3.0 +===== + +* (improvement) Always show key of task in queue tasks command. +* (feature) Add `DispatchAfterRunTask` to be able to redispatch tasks after the given run. You can use it in the Scheduler to reliably redispatch tasks. + + 2.2.0 ===== diff --git a/src/Command/QueueTasksCommand.php b/src/Command/QueueTasksCommand.php index 8fd2251..e0128c4 100644 --- a/src/Command/QueueTasksCommand.php +++ b/src/Command/QueueTasksCommand.php @@ -167,6 +167,10 @@ private function formatTaskLabel (Task $task) : string ); } - return $metaData->label; + return \sprintf( + "%s (%s)", + $metaData->label, + $metaData->getKey(), + ); } } diff --git a/src/Task/DispatchAfterRunTask/DispatchAfterRunTask.php b/src/Task/DispatchAfterRunTask/DispatchAfterRunTask.php new file mode 100644 index 0000000..7e57d28 --- /dev/null +++ b/src/Task/DispatchAfterRunTask/DispatchAfterRunTask.php @@ -0,0 +1,34 @@ +task->getMetaData()->label), + ); + } +} diff --git a/src/Task/DispatchAfterRunTask/DispatchAfterRunTaskHandler.php b/src/Task/DispatchAfterRunTask/DispatchAfterRunTaskHandler.php new file mode 100644 index 0000000..bec36d1 --- /dev/null +++ b/src/Task/DispatchAfterRunTask/DispatchAfterRunTaskHandler.php @@ -0,0 +1,32 @@ +transportNames) + ? [new TransportNamesStamp($task->transportNames)] + : []; + + $this->taskManager->enqueue($task->task, $stamps); + } +}