diff --git a/src/Service/Centrifugo.php b/src/Service/Centrifugo.php index 6bb82996f..a2b7a35a7 100644 --- a/src/Service/Centrifugo.php +++ b/src/Service/Centrifugo.php @@ -12,7 +12,6 @@ final class Centrifugo { public const GLOBAL_TIME_CHANNEL = 'global:time'; - public function __construct( private readonly Environment $environment, private readonly Client $client, @@ -21,7 +20,7 @@ final class Centrifugo public function isSupported(): bool { - return $this->environment->isDocker(); + return $this->environment->isDocker() && !$this->environment->isTesting(); } public function sendTime(): void diff --git a/src/Sync/Task/SendTimeOnSocketTask.php b/src/Sync/Task/SendTimeOnSocketTask.php index 40ff7d6b5..5a3d573fe 100644 --- a/src/Sync/Task/SendTimeOnSocketTask.php +++ b/src/Sync/Task/SendTimeOnSocketTask.php @@ -11,16 +11,16 @@ use Psr\Log\LoggerInterface; final class SendTimeOnSocketTask extends AbstractTask { public function __construct( - private readonly Centrifugo $centrifugo, ReloadableEntityManagerInterface $em, LoggerInterface $logger, + private readonly Centrifugo $centrifugo, ) { parent::__construct($em, $logger); } public static function getSchedulePattern(): string { - return '* * * * *'; + return self::SCHEDULE_EVERY_MINUTE; } public function run(bool $force = false): void