Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Apr 15, 2024
1 parent 03d8bdd commit 65de872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend/controller/cronjobs/cronjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ func (s *Service) NewCronJobsForModule(ctx context.Context, module *schemapb.Mod
return newJobs, nil
}

// CreatedOrReplacedDeloyment: When a controller creates/replaces a deployment, its cron job service is responsible for
// CreatedOrReplacedDeloyment is only called by the responsible controller to its cron service, and will not be received by the other cron services.
// When a controller creates/replaces a deployment, its cron job service is responsible for
// the newly created cron jobs until other controllers have a chance to resync their list of jobs and start sharing responsibility of the new cron jobs.
func (s *Service) CreatedOrReplacedDeloyment(ctx context.Context, newDeploymentKey model.DeploymentKey) {
// Rather than finding old/new cron jobs and updating our state, we can just resync the list of jobs
Expand Down
4 changes: 2 additions & 2 deletions backend/controller/dal/dal.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ func cronJobFromRow(row sql.GetCronJobsRow) model.CronJob {
Schedule: row.Schedule,
StartTime: row.StartTime,
NextExecution: row.NextExecution,
State: model.CronJobState(row.State),
State: row.State,
}
}

Expand Down Expand Up @@ -963,7 +963,7 @@ func (d *DAL) StartCronJobs(ctx context.Context, jobs []model.CronJob) (attempte
Schedule: row.Schedule,
StartTime: row.StartTime,
NextExecution: row.NextExecution,
State: model.CronJobState(row.State),
State: row.State,
},
DidStartExecution: row.Updated,
HasMinReplicas: row.HasMinReplicas,
Expand Down

0 comments on commit 65de872

Please sign in to comment.