chore: replace async-std with tokio (#813)

Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
Zomatree
2026-06-24 13:38:20 +01:00
committed by GitHub
parent a15a542f43
commit 01c7d925b0
35 changed files with 703 additions and 1150 deletions

View File

@@ -305,6 +305,6 @@ pub async fn worker(db: Database, amqp: AMQP) {
}
// Sleep for an arbitrary amount of time.
async_std::task::sleep(Duration::from_secs(1)).await;
tokio::time::sleep(Duration::from_secs(1)).await;
}
}

View File

@@ -82,6 +82,6 @@ pub async fn worker(db: Database) {
}
// Sleep for an arbitrary amount of time.
async_std::task::sleep(Duration::from_secs(1)).await;
tokio::time::sleep(Duration::from_secs(1)).await;
}
}

View File

@@ -2,7 +2,7 @@
use crate::{Database, AMQP};
use async_std::task;
use tokio::task;
use std::time::Instant;
const WORKER_COUNT: usize = 5;

View File

@@ -7,11 +7,11 @@ use revolt_config::config;
use revolt_result::Result;
use async_lock::Semaphore;
use async_std::task::spawn;
use deadqueue::limited::Queue;
use once_cell::sync::Lazy;
use revolt_models::v0::Embed;
use std::{collections::HashSet, sync::Arc};
use tokio::task::spawn;
use isahc::prelude::*;
@@ -159,6 +159,7 @@ pub async fn generate(
.await
.into_iter()
.flatten()
.flatten()
.collect::<Vec<Embed>>();
// Prevent database update when no embeds are found.