Skip to content

Commit

Permalink
Merge branch 'feature/65670-fix-logger-in-command' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoffmann1979 committed Aug 26, 2024
2 parents d055c14 + bd5298f commit 9fab273
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Model\Task\AbstractTask;
use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Repository\TaskRepositoryInjection;
use In2code\In2publishCore\Service\Context\ContextServiceInjection;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -50,10 +50,17 @@ class RunTasksInQueueCommand extends Command
{
use ContextServiceInjection;
use TaskRepositoryInjection;
use LoggerAwareTrait;

public const IDENTIFIER = 'in2publish_core:publishtasksrunner:runtasksinqueue';

protected ?LoggerInterface $logger = null;

public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
parent::__construct();
}

public function isEnabled(): bool
{
return $this->contextService->isForeign();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
'hidden' => true,
'schedulable' => false,
],
);
)
->public();
};

0 comments on commit 9fab273

Please sign in to comment.