Skip to content

Commit

Permalink
5002-manual check execution bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ManishaKumari295 committed Jan 21, 2024
1 parent 4731b2b commit a5cfeda
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/schedulerd/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ func (a *AdhocRequestExecutor) listenQueue(ctx context.Context) {
continue
}

if err = a.processCheck(ctx, &check); err != nil {
//create new context
newCtx := corev2.SetContextFromResource(ctx, &check)
if err = a.processCheck(newCtx, &check); err != nil {
select {
case a.listenQueueErr <- err:
case <-ctx.Done():
Expand Down Expand Up @@ -306,6 +308,10 @@ func processCheck(ctx context.Context, executor Executor, check *corev2.CheckCon
}
// publish proxy requests on matching entities
if matchedEntities := matchEntities(entities, check.ProxyRequests); len(matchedEntities) != 0 {
//display matched entities
matchedEntityJson, _ := json.Marshal(matchedEntities)q

Check failure on line 312 in backend/schedulerd/executor.go

View workflow job for this annotation

GitHub Actions / staticcheck (project)

syntax error: unexpected q at end of statement (compile)

Check failure on line 312 in backend/schedulerd/executor.go

View workflow job for this annotation

GitHub Actions / staticcheck (project)

syntax error: unexpected q at end of statement (compile)
matchedEntityJsonData := string(matchedEntityJson)
logger.WithFields(fields).Infof("matched entities: %s", matchedEntityJsonData)
if err := executor.publishProxyCheckRequests(matchedEntities, check); err != nil {
logger.WithFields(fields).WithError(err).Error("error publishing proxy check requests")
}
Expand Down

0 comments on commit a5cfeda

Please sign in to comment.