Skip to content

Commit

Permalink
[BUGFIX] Enable Logging in Command on foreign
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoffmann1979 committed Aug 5, 2024
1 parent 21df295 commit bd5298f
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 bd5298f

Please sign in to comment.