mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 02:46:29 +03:00
scheduler: make Scheduler stateless
Scheduler has no Stopped state anymore. If Scheduler exists, it is always started. Scheduler is stopped via Scheduler.stop(), which consumes Scheduler and cannot fail.
This commit is contained in:
@@ -60,7 +60,7 @@ impl Context {
|
||||
use futures::future::FutureExt;
|
||||
|
||||
ensure!(
|
||||
!self.scheduler.read().await.is_running(),
|
||||
self.scheduler.read().await.is_none(),
|
||||
"cannot configure, already running"
|
||||
);
|
||||
ensure!(
|
||||
|
||||
Reference in New Issue
Block a user