Skip to content

Commit

Permalink
Remove redundant comments about policy and schedule synchronization i…
Browse files Browse the repository at this point in the history
…n PublicApiHandler
  • Loading branch information
bonzofenix committed Dec 15, 2024
1 parent 9180950 commit abb02a3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/autoscaler/api/publicapiserver/public_api_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ func (h *PublicApiHandler) AttachScalingPolicy(w http.ResponseWriter, r *http.Re

h.logger.Info("creating/updating schedules", lager.Data{"policy": policy})

//while there is synchronization between policy and schedule, so creating schedule error does not break
//the whole creating binding process
if err := h.schedulerUtil.CreateOrUpdateSchedule(r.Context(), appId, policy, policyGuid); err != nil {
logger.Error("Failed to create/update schedule", err)
writeErrorResponse(w, http.StatusInternalServerError, err.Error())
Expand Down Expand Up @@ -273,8 +271,6 @@ func (h *PublicApiHandler) saveDefaultPolicy(w http.ResponseWriter, r *http.Requ
return errors.New("error attaching the default policy")
}

//while there is synchronization between policy and schedule, so creating schedule error does not break
//the whole creating binding process
logger.Info("creating/updating schedules", lager.Data{"policy": policyStr})
if err := h.schedulerUtil.CreateOrUpdateSchedule(r.Context(), appId, policy, policyGuidStr); err != nil {
logger.Error("failed to create/update schedules", err, lager.Data{"policy": policyStr})
Expand Down

0 comments on commit abb02a3

Please sign in to comment.