Function is_global_init_recently_completed

Source
pub async fn is_global_init_recently_completed(
    pool: &Arc<Pool>,
    prefix: &str,
    threshold_secs: u64,
) -> Result<bool>
Expand description

Checks if global initialization was recently completed within the given threshold.

This is used to skip initialization when another instance recently completed initialization (e.g., during rolling restarts).

§Arguments

  • conn - Redis connection manager
  • prefix - Key prefix for multi-tenant support
  • threshold_secs - Number of seconds to consider as “recent”

§Returns

  • Ok(true) - If initialization was completed within the threshold
  • Ok(false) - If initialization was not completed or is stale
  • Err(_) - Redis communication error