Skip to content

Commit

Permalink
fix: fix update status not update (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Apr 12, 2024
1 parent e8eb754 commit 05c9cb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions route/v2/compose_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,6 @@ func (a *AppManagement) UpdateComposeApp(ctx echo.Context, id codegen.ComposeApp

backgroundCtx := common.WithProperties(context.Background(), PropertiesFromQueryParams(ctx))

service.MyService.AppStoreManagement().StartUpgrade(id)
defer service.MyService.AppStoreManagement().FinishUpgrade(id)

if err := composeApp.Update(backgroundCtx); err != nil {
logger.Error("failed to update compose app", zap.Error(err), zap.String("appID", id))
message := err.Error()
Expand Down
3 changes: 3 additions & 0 deletions service/compose_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ func (a *ComposeApp) Update(ctx context.Context) error {

defer PublishEventWrapper(ctx, common.EventTypeAppUpdateEnd, nil)

MyService.AppStoreManagement().StartUpgrade(a.Name)
defer MyService.AppStoreManagement().FinishUpgrade(a.Name)

if err := a.PullAndApply(ctx, newComposeYAML); err != nil {
go PublishEventWrapper(ctx, common.EventTypeAppUpdateError, map[string]string{
common.PropertyTypeMessage.Name: err.Error(),
Expand Down

0 comments on commit 05c9cb9

Please sign in to comment.