Skip to content

Commit

Permalink
fix: plugin name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Jan 14, 2025
1 parent 96b9f2f commit 565ae75
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions jobs/cloudql-init-job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
"os"
"os/exec"
)

type Job struct {
Expand Down Expand Up @@ -92,5 +93,19 @@ func (j *Job) Run(ctx context.Context) error {
return err
}

cmd := exec.Command("steampipe", "service", "stop", "--force")
err = cmd.Run()
if err != nil {
j.logger.Error("first stop failed", zap.Error(err))
return err
}
//NOTE: stop must be called twice. it's not a mistake
cmd = exec.Command("steampipe", "service", "stop", "--force")
err = cmd.Run()
if err != nil {
j.logger.Error("second stop failed", zap.Error(err))
return err
}

return nil
}

0 comments on commit 565ae75

Please sign in to comment.