make_worker

Function make_worker 

Source
pub fn make_worker<Fut1, Fut2>(
    pg_pool: SqlxPool,
    token: CancellationToken,
    stop_check_duration: Duration,
    task_function: impl Fn(DateTime<Utc>, SqlxPool, CancellationToken) -> Fut1 + Send + Sync + 'static,
    stop_function: impl Fn(SqlxPool) -> Fut2 + Send + Sync + 'static,
) -> JoinHandle<()>
where Fut1: Future<Output = LoopState> + Send, Fut2: Future<Output = ()> + Send,