resolved remaining issues
This commit is contained in:
@@ -1,3 +1 @@
|
|||||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.19
|
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.19
|
||||||
|
|
||||||
pub use super::alarm::Entity as Alarm;
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ use crate::types::Alarm;
|
|||||||
pub struct Scheduler {
|
pub struct Scheduler {
|
||||||
ringer: Arc<Mutex<dyn Ringer>>,
|
ringer: Arc<Mutex<dyn Ringer>>,
|
||||||
cron: Arc<Mutex<Cron<Local>>>,
|
cron: Arc<Mutex<Cron<Local>>>,
|
||||||
alarms: Arc<Mutex<Vec<Alarm>>>,
|
|
||||||
db: Arc<DatabaseConnection>,
|
db: Arc<DatabaseConnection>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +27,6 @@ impl Scheduler {
|
|||||||
Self {
|
Self {
|
||||||
ringer,
|
ringer,
|
||||||
cron,
|
cron,
|
||||||
alarms: Arc::new(Mutex::new(Vec::new())),
|
|
||||||
db,
|
db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,9 +103,9 @@ impl Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn register_existing_alarms(&self) {
|
async fn register_existing_alarms(&self) {
|
||||||
let alarmsResult = self.get_alarms(Some(true)).await;
|
let alarms_result = self.get_alarms(Some(true)).await;
|
||||||
|
|
||||||
match alarmsResult {
|
match alarms_result {
|
||||||
Ok(alarms) => {
|
Ok(alarms) => {
|
||||||
self.register_alarms(alarms);
|
self.register_alarms(alarms);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user