Skip to content

Commit

Permalink
use node worker as const
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Gupta <[email protected]>
  • Loading branch information
varungup90 committed Mar 3, 2025
1 parent 4500c19 commit 2b6eb4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type Block struct {
const (
modelIdentifier = "model.aibrix.ai/name"
nodeType = "ray.io/node-type"
nodeWorker = "worker"
podPort = 8000
defaultPodMetricRefreshIntervalInMS = 50
expireWriteRequestTraceIntervalInMins = 10
Expand Down Expand Up @@ -299,7 +300,7 @@ func (c *Cache) addPod(obj interface{}) {
}
// ignore worker pods
nodeType, ok := pod.Labels[nodeType]
if ok && nodeType == "worker" {
if ok && nodeType == nodeWorker {
klog.InfoS("ignored ray worker pod", "name", pod.Name)
return
}
Expand Down Expand Up @@ -332,14 +333,14 @@ func (c *Cache) updatePod(oldObj interface{}, newObj interface{}) {

// ignore worker pods
nodeType, ok := oldPod.Labels[nodeType]
if ok && nodeType == "worker" {
if ok && nodeType == nodeWorker {
klog.InfoS("ignored ray worker pod", "name", oldPod.Name)
return
}

// ignore worker pods
nodeType, ok = newPod.Labels[nodeType]
if ok && nodeType == "worker" {
if ok && nodeType == nodeWorker {
klog.InfoS("ignored ray worker pod", "name", newPod.Name)
return
}
Expand Down

0 comments on commit 2b6eb4c

Please sign in to comment.