pub async fn initialize_redis_workers<J, RR, TR, NR, NFR, SR, TCR, PR, AKR>(
app_state: ThinDataAppState<J, RR, TR, NR, NFR, SR, TCR, PR, AKR>,
handle: Handle,
shutdown_rx: Receiver<bool>,
) -> Result<WorkerHandle>where
J: JobProducerTrait + Send + Sync + 'static,
RR: RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static,
TR: TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static,
NR: NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static,
NFR: Repository<NotificationRepoModel, String> + Send + Sync + 'static,
SR: Repository<SignerRepoModel, String> + Send + Sync + 'static,
TCR: TransactionCounterTrait + Send + Sync + 'static,
PR: PluginRepositoryTrait + Send + Sync + 'static,
AKR: ApiKeyRepositoryTrait + Send + Sync + 'static,Expand description
Initializes Redis/Apalis workers and starts the lifecycle monitor.
ยงArguments
app_state- Application state containing the job producer and configurationshutdown_rx- Backend-level shutdown signal (mirrors the SQS/PubSubwatchpattern). Selected alongside SIGINT/SIGTERM soQueueBackend::shutdown()can stop this monitor on a programmatic shutdown, not just on an OS signal.