mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
feature: Adding in the stopping state (#2677)
* feature: Adding in the stopping state * chore: Deal with timeout in the sigterm for main * chore: Update the timeout * Update web/projects/ui/src/app/pages/apps-routes/app-list/app-list-pkg/app-list-pkg.component.ts Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> * Update web/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.ts Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> --------- Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
@@ -481,20 +481,20 @@ export class SystemForEmbassy implements System {
|
||||
private async mainStop(
|
||||
effects: Effects,
|
||||
timeoutMs: number | null,
|
||||
): Promise<Duration> {
|
||||
const { currentRunning } = this
|
||||
this.currentRunning?.clean()
|
||||
delete this.currentRunning
|
||||
if (currentRunning) {
|
||||
await currentRunning.clean({
|
||||
timeout: fromDuration(this.manifest.main["sigterm-timeout"]),
|
||||
})
|
||||
): Promise<void> {
|
||||
try {
|
||||
const { currentRunning } = this
|
||||
this.currentRunning?.clean()
|
||||
delete this.currentRunning
|
||||
if (currentRunning) {
|
||||
await currentRunning.clean({
|
||||
timeout: utils.inMs(this.manifest.main["sigterm-timeout"]),
|
||||
})
|
||||
}
|
||||
return
|
||||
} finally {
|
||||
await effects.setMainStatus({ status: "stopped" })
|
||||
}
|
||||
const durationValue = duration(
|
||||
fromDuration(this.manifest.main["sigterm-timeout"]),
|
||||
"s",
|
||||
)
|
||||
return durationValue
|
||||
}
|
||||
private async createBackup(
|
||||
effects: Effects,
|
||||
|
||||
Reference in New Issue
Block a user