use crate::card_service::replay::IRePlayClickHouseDB;
use crate::static_def::REPLAY_DB;
use crate::timer::Timer;
pub struct CommitReplayTimer;
#[async_trait::async_trait]
impl Timer for CommitReplayTimer {
#[inline]
async fn init(&self) -> anyhow::Result<(bool, u64)> {
Ok((false, 5000))
}
#[inline]
async fn run(&self) -> anyhow::Result<()> {
REPLAY_DB.commit().await?;
Ok(())
}
}