Disable Centrifugo in testing.

This commit is contained in:
Buster Neece 2022-12-28 10:13:26 -06:00
parent 6a5276820b
commit 0c3fb7bd43
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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