mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
Feature/restart service (#1554)
* add restart button to service show page and restart rpc api * Feature/restart rpc (#1555) * add restart rpc and status * wire up rpc * add restarting bool Co-authored-by: Aiden McClelland <me@drbonez.dev> * check if service is restarting * filter package when restarting to avoid glitch Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -268,9 +268,11 @@ async fn perform_backup<Db: DbHandle>(
|
||||
|
||||
main_status_model.lock(&mut tx, LockType::Write).await?;
|
||||
let (started, health) = match main_status_model.get(&mut tx, true).await?.into_owned() {
|
||||
MainStatus::Starting => (Some(Utc::now()), Default::default()),
|
||||
MainStatus::Starting { .. } => (Some(Utc::now()), Default::default()),
|
||||
MainStatus::Running { started, health } => (Some(started), health.clone()),
|
||||
MainStatus::Stopped | MainStatus::Stopping => (None, Default::default()),
|
||||
MainStatus::Stopped | MainStatus::Stopping | MainStatus::Restarting => {
|
||||
(None, Default::default())
|
||||
}
|
||||
MainStatus::BackingUp { .. } => {
|
||||
backup_report.insert(
|
||||
package_id,
|
||||
|
||||
Reference in New Issue
Block a user