orka.startup.infrastructure.redis module
Redis Infrastructure Management
This module handles Redis Stack management including native startup and Docker fallback.
- orka.startup.infrastructure.redis.start_native_redis(port: int = 6380) Popen | None [source]
Start Redis Stack natively on the specified port, with Docker fallback.
- Parameters:
port – Port to start Redis on (default: 6380)
- Returns:
The Redis process, or None if using Docker
- Return type:
subprocess.Popen
- Raises:
RuntimeError – If both native and Docker Redis fail to start
- orka.startup.infrastructure.redis.start_redis_docker(port: int = 6380) None [source]
Start Redis Stack using Docker as a fallback.
- Parameters:
port – Port to start Redis on
- Returns:
Docker process is managed by Docker daemon
- Return type:
None
- Raises:
RuntimeError – If Docker Redis fails to start
- orka.startup.infrastructure.redis.wait_for_redis(port: int, max_attempts: int = 30) None [source]
Wait for Redis to be ready and responsive (works for both native and Docker).
- Parameters:
port – Redis port to check
max_attempts – Maximum number of connection attempts
- Raises:
RuntimeError – If Redis doesn’t become ready within the timeout