Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -0,0 +1,76 @@
<?php
declare(strict_types=1);
namespace App\Framework\Redis;
/**
* Configuration for Redis connections
*/
final readonly class RedisConfig
{
public function __construct(
public string $host = 'redis',
public int $port = 6379,
public ?string $password = null,
public int $database = 0,
public float $timeout = 1.0,
public float $readWriteTimeout = 1.0,
public string $scheme = 'tcp',
public array $options = []
) {
}
/**
* Create configuration from environment variables or defaults
*/
public static function fromEnvironment(string $prefix = 'REDIS_'): self
{
return new self(
host: $_ENV[$prefix . 'HOST'] ?? 'redis',
port: (int) ($_ENV[$prefix . 'PORT'] ?? 6379),
password: $_ENV[$prefix . 'PASSWORD'] ?? null,
database: (int) ($_ENV[$prefix . 'DB'] ?? 0),
timeout: (float) ($_ENV[$prefix . 'TIMEOUT'] ?? 1.0),
readWriteTimeout: (float) ($_ENV[$prefix . 'READ_WRITE_TIMEOUT'] ?? 1.0)
);
}
/**
* Create a new config with different database
*/
public function withDatabase(int $database): self
{
return new self(
host: $this->host,
port: $this->port,
password: $this->password,
database: $database,
timeout: $this->timeout,
readWriteTimeout: $this->readWriteTimeout,
scheme: $this->scheme,
options: $this->options
);
}
/**
* Convert to Predis connection parameters
*/
public function toConnectionParameters(): array
{
$params = [
'scheme' => $this->scheme,
'host' => $this->host,
'port' => $this->port,
'database' => $this->database,
'timeout' => $this->timeout,
'read_write_timeout' => $this->readWriteTimeout,
];
if ($this->password) {
$params['password'] = $this->password;
}
return array_merge($params, $this->options);
}
}