Command/Example/AddExampleTaskCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->initialiseWorker($input, $output);
        $totalTasks = $input->getOption('total-tasks');
        for ($counter = 0; $counter < $totalTasks; $counter++) {
            $task = new ExampleTaskDescription();
            $task->message = 'hello world';
            $task->wait = 1;
            $this->taskQueueService->queueTask($task, $this->tube);
        }
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->initialiseWorker($input, $output);
        $totalTasks = $input->getOption('total-tasks');
        for ($counter = 0; $counter < $totalTasks; $counter++) {
            $task = new ExampleTaskDescription();
            $task->message = 'hello world';
            $task->wait = 1;
            $this->taskQueueService->queueTask($task, $this->tube);
        }
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { $ this -> initialiseWorker ( $ input , $ output ) ; $ totalTasks = $ input -> getOption ( 'total-tasks' ) ; for ( $ counter = 0 ; $ counter < $ totalTasks ; $ counter ++ ) { $ task = new ExampleTaskDescription ( ) ; $ task -> message = 'hello world' ; $ task -> wait = 1 ; $ this -> taskQueueService -> queueTask ( $ task , $ this -> tube ) ; } }
Adds an example task to the task queue using the ExampleTask.php

@param InputInterface $input
@param OutputInterface $output
@return void
@throws \InvalidArgumentException
Adds an example task to the task queue using the ExampleTask . php