feat: add link embed generation

This commit is contained in:
Paul Makles
2022-04-14 20:46:46 +01:00
parent d2f0fb3414
commit 87391a49a5
7 changed files with 170 additions and 25 deletions

15
src/tasks/mod.rs Normal file
View File

@@ -0,0 +1,15 @@
//! Semi-important background task management
use async_std::task;
use revolt_quark::Database;
const WORKER_COUNT: usize = 10;
pub mod process_embeds;
/// Spawn background workers
pub async fn start_workers(db: Database) {
for _ in 0..WORKER_COUNT {
task::spawn(process_embeds::worker(db.clone()));
}
}