Skip to content

Commit

Permalink
simplify if statement for metrics in 'leave_New'
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyulin0719 committed Oct 19, 2023
1 parent d2ac35d commit 18dc40a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/objects/application_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func NewAppState() *fsm.FSM {
app.setStateTimer(completingTimeout, app.stateMachine.Current(), CompleteApplication)
},
fmt.Sprintf("leave_%s", New.String()): func(_ context.Context, event *fsm.Event) {
if event.Dst == Resuming.String() || event.Dst == Accepted.String() {
if event.Dst != Rejected.String() {
app := event.Args[0].(*Application) //nolint:errcheck
metrics.GetQueueMetrics(app.queuePath).IncQueueApplicationsAccepted()
metrics.GetSchedulerMetrics().IncTotalApplicationsAccepted()
Expand Down

0 comments on commit 18dc40a

Please sign in to comment.