pub async fn spawn_persistence(manager: &Manager<'_>) {
    debug!("Spawning persistence job.");

    if let Some(config) = manager.config().persistence.as_ref() {
        let timer = Duration::from_secs(config.timer);

        loop {
            delay_for(timer).await;
            if let Err(e) = manager.snapshot().await {
                error!("{}", e)
            }
        }
    }
}
/// Persistence job spawner
///
/// Persists whole queue when [Snapshot] driver is enabled, and only replication storage if [Log] driver is being used
///
/// [Snapshot]: crate::node::persistence::snapshot::Snapshot
/// [Log]: crate::node::persistence::log::Log
Persistence job spawner
Persists whole queue when [Snapshot] driver is enabled, and only replication storage if [Log] driver is being used


Persistence job spawner Persists whole queue when [ Snapshot ] driver is enabled and only replication storage if [ Log ] driver is being used
pub async fn spawn_persistence(manager: &Manager<'_>) {
    debug!("Spawning persistence job.");
    if let Some(config) = manager.config().persistence.as_ref() {
        let timer = Duration::from_secs(config.timer);
        loop {
            delay_for(timer).await;
            if let Err(e) = manager.snapshot().await {
                error!("{}", e)
            }
        }
    }
}
pub async fn spawn_persistence ( manager : & Manager < ' _ > ) { debug ! ( " " ) ; if let Some ( config ) = manager . config ( ) . persistence . as_ref ( ) { let timer = Duration :: from_secs ( config . timer ) ; loop { delay_for ( timer ) . await ; if let Err ( e ) = manager . snapshot ( ) . await { error ! ( " " e ) } } } }
Persistence job spawner
Persists whole queue when [Snapshot] driver is enabled, and only replication storage if [Log] driver is being used
Persistence job spawner Persists whole queue when [ Snapshot ] driver is enabled and only replication storage if [ Log ] driver is being used
manager
&Manager<'_>
manager
&Manager<'_>