forked from jmug/stoatchat
feat(tasks): implement web push
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
use async_std::task;
|
||||
use revolt_quark::Database;
|
||||
|
||||
const WORKER_COUNT: usize = 10;
|
||||
const WORKER_COUNT: usize = 5;
|
||||
|
||||
pub mod process_embeds;
|
||||
pub mod web_push;
|
||||
|
||||
/// Spawn background workers
|
||||
pub async fn start_workers(db: Database) {
|
||||
for _ in 0..WORKER_COUNT {
|
||||
task::spawn(process_embeds::worker(db.clone()));
|
||||
task::spawn(web_push::worker(db.clone()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user