You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "pbacsko (via GitHub)" <gi...@apache.org> on 2023/06/14 10:31:41 UTC

[GitHub] [yunikorn-core] pbacsko commented on a diff in pull request #567: [YUNIKORN-1717] cache sortedQueues

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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org