Skip to main content

run_worker

Function run_worker 

Source
pub async fn run_worker<E, T, H>(
    queue: Arc<Queue<E>>,
    config: WorkerConfig,
    handler: H,
    shutdown: Receiver<()>,
) -> JoinHandle<()>
where E: TitoEngine + 'static, T: EventType + Serialize + DeserializeOwned, H: Fn(QueueEvent<T>) -> BoxFuture<'static, Result<(), TitoError>> + Clone + Send + Sync + 'static,