Skip to content

Commit

Permalink
set sink status when deployment status change (#2700)
Browse files Browse the repository at this point in the history
Co-authored-by: etaques <[email protected]>
  • Loading branch information
etaques and etaques authored Oct 3, 2023
1 parent 42977c2 commit 6b71ea9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions maestro/deployment/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package deployment
import (
"context"
"errors"
"time"

"github.com/orb-community/orb/maestro/config"
"github.com/orb-community/orb/maestro/kubecontrol"
"github.com/orb-community/orb/maestro/password"
"github.com/orb-community/orb/maestro/redis/producer"
"github.com/orb-community/orb/pkg/types"
"go.uber.org/zap"
"time"
)

const AuthenticationKey = "authentication"
Expand Down Expand Up @@ -253,7 +254,10 @@ func (d *deploymentService) UpdateStatus(ctx context.Context, ownerID string, si
d.logger.Info("updated deployment status",
zap.String("ownerID", updated.OwnerID), zap.String("sinkID", updated.SinkID),
zap.String("status", updated.LastStatus), zap.String("errorMessage", updated.LastErrorMessage))

err = d.maestroProducer.PublishSinkStatus(ctx, updated.OwnerID, updated.SinkID, updated.LastStatus, "")
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 6b71ea9

Please sign in to comment.