pbacsko commented on code in PR #567:
URL: https://github.com/apache/yunikorn-core/pull/567#discussion_r1229383514
##########
pkg/scheduler/objects/object_state.go:
##########
@@ -78,12 +78,25 @@ func NewObjectState() *fsm.FSM {
},
fsm.Callbacks{
"enter_state": func(_ context.Context, event
*fsm.Event) {
+ var object string
+ switch v := event.Args[0].(type) {
+ case *Queue:
+ object = v.QueuePath
+ case string:
+ object = v
Review Comment:
When is it "Queue" and when is it "string"? It seems to me that we only
handle events from a single place so `event.Args[0]` will always be a "Queue"
from this point on.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]