feat(backend) scheduler rewrite (deadlock for now)

This commit is contained in:
lumither committed 2025-03-05 13:52:07 -08:00
1 parent 0c6325d5f2
commit 5e8b1ff35d
8 files changed
+267 -139

No files matched your search

+6 -3
View File
@@ -3,7 +3,6 @@ mod cron;
use crate::{
modules::{
Module,
blog::{
api::{
get_page_count,
@@ -12,11 +11,12 @@ use crate::{
},
// cron::check_update,
},
Module,
},
scheduler::tasks::CronTask,
scheduler::tasks::{async_basic::AsyncBasic, CronTask},
};
use axum::{Router, routing::get};
use axum::{routing::get, Router};
use sqlx::PgPool;
const MOUNT_POINT: &str = "/blog";
@@ -47,6 +47,9 @@ impl Module for Blog {
// BasicTask::new(move || check_update::task(&db_handler), "0/15 * * * * *")
// .unwrap()
// .to_task(),
AsyncBasic::new(|| Box::pin(async { println!("test") }), "* * * * * *")
.unwrap()
.to_task(),
]
}
}