Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Resources/config/command.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="task.command.run" class="Task\TaskBundle\Command\RunCommand" public="true">
<argument type="string">task:run</argument>
<argument>null</argument>
<argument type="service" id="task.runner"/>
<argument type="service" id="task.scheduler"/>
<!-- add entity_manager if doctrine storage is enabled -->
Expand All @@ -13,14 +13,14 @@
</service>

<service id="task.command.run_handler" class="Task\TaskBundle\Command\RunHandlerCommand" public="true">
<argument type="string">task:run:handler</argument>
<argument>null</argument>
<argument type="service" id="task.handler.factory"/>

<tag name="console.command" command="task:run:handler"/>
</service>

<service id="task.command.executor" class="Task\TaskBundle\Command\ExecuteCommand" public="true">
<argument type="string">task:execute</argument>
<argument>null</argument>
<argument type="service" id="task.handler.factory"/>
<argument type="service" id="task.storage.task_execution"/>
<argument type="service" id="event_dispatcher"/>
Expand All @@ -29,15 +29,15 @@
</service>

<service id="task.command.schedule_task" class="Task\TaskBundle\Command\ScheduleTaskCommand" public="true">
<argument type="string">task:schedule</argument>
<argument>null</argument>
<argument type="service" id="task.scheduler"/>
<!-- add entity_manager if doctrine storage is enabled -->

<tag name="console.command" command="task:schedule"/>
</service>

<service id="task.command.debug_tasks" class="Task\TaskBundle\Command\DebugTasksCommand" public="true">
<argument type="string">debug:tasks</argument>
<argument>null</argument>
<argument type="service" id="task.storage.task_execution"/>

<tag name="console.command" command="debug:tasks"/>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/config/storage/doctrine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
<service id="task.storage.task_execution" alias="task.repository.task_execution" public="true"/>

<service id="task.command.schedule_system_tasks" class="Task\TaskBundle\Command\ScheduleSystemTasksCommand" public="true">
<argument type="string">task:schedule:system-tasks</argument>
<argument>null</argument>
<argument>%task.system_tasks%</argument>
<argument type="service" id="task.scheduler"/>
<argument type="service" id="task.repository.task"/>
<argument type="service" id="task.storage.task_execution"/>

<tag name="console.command"/>
<tag name="console.command" command="task:schedule:system-tasks"/>
</service>
</services>
</container>
2 changes: 1 addition & 1 deletion tests/Unit/Command/ScheduleSystemTasksCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function setUp(): void
protected function createCommand(array $systemTasks)
{
return new ScheduleSystemTasksCommand(
'task:schedule:system-tasks',
null,
$systemTasks,
$this->scheduler->reveal(),
$this->taskRepository->reveal(),
Expand Down
Loading