hook up scheduler with jobs

This commit is contained in:
dignifiedquire
2020-03-18 00:01:59 +01:00
parent ce5b95f8e5
commit 846ef043d5
7 changed files with 604 additions and 722 deletions

View File

@@ -26,7 +26,7 @@ use crate::scheduler::Scheduler;
use crate::smtp::Smtp;
use crate::sql::Sql;
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct Context {
pub(crate) inner: Arc<InnerContext>,
}
@@ -131,7 +131,7 @@ impl Context {
}
pub async fn run(&self) {
self.inner.scheduler.write().await.run().await
self.inner.scheduler.write().await.run(self.clone()).await
}
pub async fn stop(&self) {