feat: backend executor implement

This commit is contained in:
2026-08-16 17:12:06 +08:00
parent 390e0565d3
commit 7755da72e7
31 changed files with 2762 additions and 184 deletions
+4
View File
@@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"yms-daemon/internal/deploymentconfig"
"yms-daemon/internal/transaction"
"yms-daemon/internal/updatepackage"
)
@@ -15,6 +16,9 @@ import (
// Restart performs a zero-downtime rotation with the exact release currently
// exposed by the compatibility JAR path.
func (u *Updater) Restart(ctx context.Context, report ProgressReporter) (transaction.Transaction, error) {
if u.config.Backend.Type == deploymentconfig.BackendTypeContainer {
return transaction.Transaction{}, errors.New("restart is not implemented for container backend")
}
reportProgress(report, Progress{Message: "Resolving the current native backend release"})
active, err := u.store.ActiveTransaction(ctx)
if err == nil {