Fix/receipts health (#1616)

* release lock on update progress (#1614)

* chore: remove the receipt

* chore: Remove the receipt

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
J M
2022-07-12 12:48:01 -06:00
committed by GitHub
parent 1367428499
commit 50e7b479b5
2 changed files with 122 additions and 61 deletions

View File

@@ -63,6 +63,16 @@ impl MainStatus {
MainStatus::Stopped | MainStatus::Stopping | MainStatus::Restarting => (),
}
}
pub fn started(&self) -> Option<DateTime<Utc>> {
match self {
MainStatus::Running { started, .. } => Some(*started),
MainStatus::BackingUp { started, .. } => *started,
MainStatus::Stopped => None,
MainStatus::Restarting => None,
MainStatus::Stopping => None,
MainStatus::Starting { .. } => None,
}
}
}
impl MainStatusModel {
pub fn started(self) -> Model<Option<DateTime<Utc>>> {