mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
wip: Refactoring the service
-> Made new skeleton -> Added service manager -> Manager Refactored -> Cleanup -> Add gid struct -> remove synchronizer -> Added backup into manager -> Fix the configure signal not send -> Fixes around backup and sync wip: Moved over the config into the service manager
This commit is contained in:
@@ -73,6 +73,18 @@ impl MainStatus {
|
||||
MainStatus::Starting { .. } => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn backing_up(&self) -> Self {
|
||||
let (started, health) = match self {
|
||||
MainStatus::Starting { .. } => (Some(Utc::now()), Default::default()),
|
||||
MainStatus::Running { started, health } => (Some(started.clone()), health.clone()),
|
||||
MainStatus::Stopped | MainStatus::Stopping | MainStatus::Restarting => {
|
||||
(None, Default::default())
|
||||
}
|
||||
MainStatus::BackingUp { .. } => return self.clone(),
|
||||
};
|
||||
MainStatus::BackingUp { started, health }
|
||||
}
|
||||
}
|
||||
impl MainStatusModel {
|
||||
pub fn started(self) -> Model<Option<DateTime<Utc>>> {
|
||||
|
||||
Reference in New Issue
Block a user