pub async fn is_relayer_recently_synced(
pool: &Arc<Pool>,
prefix: &str,
relayer_id: &str,
threshold_secs: u64,
) -> Result<bool>Expand description
Checks if a relayer was recently synced within the given threshold.
This is used to skip initialization for relayers that were recently initialized by another instance (e.g., during rolling restarts).
§Arguments
conn- Redis connection managerprefix- Key prefix for multi-tenant supportrelayer_id- The relayer’s unique identifierthreshold_secs- Number of seconds to consider as “recent”
§Returns
Ok(true)- If the relayer was synced within the thresholdOk(false)- If the relayer was not synced or sync is staleErr(_)- Redis communication error