Skip to content

Commit

Permalink
feat: add duration configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Jul 11, 2024
1 parent 38d6ce1 commit 4b29ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scheduler/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ func (s *Service) runOptimizationJob(ctx context.Context, job *database.Optimiza
return
}

ctx, cancel := context.WithTimeout(ctx, s.cfg.GetOptimizationJobRunTimeout())
jobCtx, cancel := context.WithTimeout(ctx, s.cfg.GetOptimizationJobRunTimeout())
defer cancel()
err = s.kaytuCmd.Optimize(ctx, job.Command)
err = s.kaytuCmd.Optimize(jobCtx, job.Command)
if err != nil {
s.logger.Error("failed to run kaytu optimization", zap.String("command", job.Command), zap.Error(err))
jobStatus = database.OptimizationJobStatusFailed
Expand Down

0 comments on commit 4b29ed9

Please sign in to comment.