mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(backend) scheduler rewrite (deadlock for now)
This commit is contained in:
8 files changed
+267
-139
No files matched your search
@@ -1,5 +1,4 @@
|
||||
use std::error::Error;
|
||||
use std::str::FromStr;
|
||||
use std::{error::Error, pin::Pin, str::FromStr};
|
||||
|
||||
use crate::scheduler::{task_func::TaskFunc, tasks::CronTask};
|
||||
|
||||
@@ -32,7 +31,7 @@ impl CronTask for BasicTask {
|
||||
self.schedule.upcoming(Utc).next()
|
||||
}
|
||||
|
||||
fn call(&self) {
|
||||
(self.func)()
|
||||
fn call(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>> {
|
||||
Box::pin(async { (self.func)() })
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user