Skip to content

Commit

Permalink
feat(maestro): cleaning and fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Pegoraro committed Sep 25, 2023
1 parent af11874 commit 851388c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions maestro/service/deploy_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,8 @@ func NewEventService(logger *zap.Logger, service deployment.Service, _ kubecontr

// HandleSinkCreate will create deployment entry in postgres, will create deployment in Redis, to prepare for SinkActivity
func (d *eventService) HandleSinkCreate(ctx context.Context, event maestroredis.SinksUpdateEvent) error {
now := time.Now()
// Create Deployment Entry
entry := deployment.Deployment{
OwnerID: event.Owner,
SinkID: event.SinkID,
Config: event.Config,
Backend: event.Backend,
LastStatus: "provisioning",
LastStatusUpdate: &now,
LastErrorMessage: "",
LastErrorTime: nil,
CollectorName: "",
LastCollectorDeployTime: nil,
LastCollectorStopTime: nil,
}
entry := deployment.NewDeployment(event.Owner, event.SinkID, event.Config)
// Use deploymentService, which will create deployment in both postgres and redis
err := d.deploymentService.CreateDeployment(ctx, &entry)
if err != nil {
Expand Down

0 comments on commit 851388c

Please sign in to comment.