mmucklo /
DtcQueueBundle
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Dtc\QueueBundle\Command; |
||||||
| 4 | |||||||
| 5 | use Dtc\QueueBundle\Manager\JobManagerInterface; |
||||||
| 6 | use Symfony\Component\Console\Command\Command; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 7 | use Symfony\Component\Console\Input\InputInterface; |
||||||
|
0 ignored issues
–
show
The type
Symfony\Component\Console\Input\InputInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||||
| 8 | use Symfony\Component\Console\Output\OutputInterface; |
||||||
|
0 ignored issues
–
show
The type
Symfony\Component\Console\Output\OutputInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||||
| 9 | |||||||
| 10 | class ResetCommand extends Command |
||||||
| 11 | { |
||||||
| 12 | /** @var JobManagerInterface */ |
||||||
| 13 | private $jobManager; |
||||||
| 14 | |||||||
| 15 | 1 | protected function configure(): void |
|||||
| 16 | { |
||||||
| 17 | $this |
||||||
| 18 | 1 | ->setName('dtc:queue:reset') |
|||||
| 19 | 1 | ->setDescription('Reset jobs with exception or stalled status'); |
|||||
| 20 | 1 | } |
|||||
| 21 | |||||||
| 22 | 1 | public function setJobManager($jobManager) |
|||||
| 23 | { |
||||||
| 24 | 1 | $this->jobManager = $jobManager; |
|||||
| 25 | 1 | } |
|||||
| 26 | |||||||
| 27 | 1 | protected function execute(InputInterface $input, OutputInterface $output): int |
|||||
| 28 | { |
||||||
| 29 | 1 | $countException = $this->jobManager->resetExceptionJobs(); |
|||||
| 30 | 1 | $countStalled = $this->jobManager->resetStalledJobs(); |
|||||
|
0 ignored issues
–
show
The method
resetStalledJobs() does not exist on Dtc\QueueBundle\Manager\JobManagerInterface. It seems like you code against a sub-type of Dtc\QueueBundle\Manager\JobManagerInterface such as Dtc\QueueBundle\Manager\StallableJobManager.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 31 | 1 | $output->writeln("$countException job(s) in status 'exception' reset"); |
|||||
| 32 | 1 | $output->writeln("$countStalled job(s) stalled (in status 'running') reset"); |
|||||
| 33 | |||||||
| 34 | 1 | return $this::SUCCESS; |
|||||
| 35 | } |
||||||
| 36 | } |
||||||
| 37 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths