worker

This commit is contained in:
JMARyA 2025-03-07 20:04:58 +01:00
parent 5cb4facc48
commit e3393f1e09
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
11 changed files with 841 additions and 48 deletions

View file

@ -2,6 +2,19 @@ use std::{sync::mpsc, thread, time::Instant};
pub mod job;
pub mod service;
pub use comrade_macro::worker;
use dashmap::DashMap;
use once_cell::sync::Lazy;
pub use serde_json;
// TODO : worker docs + refactor
// TODO : worker non blocking fn call
// TODO : worker parallelism (Load Balanced Queue + Multiple Threads)
// TODO : refactor dispatcher backends (memory, valkey)
pub static UNION: Lazy<
DashMap<&'static str, job::JobDispatcher<serde_json::Value, serde_json::Value>>,
> = Lazy::new(DashMap::new);
/// Rally Function
///