Skip to content

Commit

Permalink
fix(torch): cleanup not needed comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Ramon Mañes <[email protected]>
  • Loading branch information
tty47 committed Nov 13, 2023
1 parent aa62e48 commit 3c5a220
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/k8s/statefulsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,13 @@ func WatchStatefulSets() error {

// Watch for events on the watcher channel
for event := range watcher.ResultChan() {
// Check if the event object is of type *v1.StatefulSet
if statefulSet, ok := event.Object.(*v1.StatefulSet); ok {
if !ok {
// If it's not a StatefulSet, log a warning and continue with the next event.
log.Warn("Received an event that is not a StatefulSet. Skipping this resource...")
continue
}

// Check if the StatefulSet is valid based on the conditions
if isStatefulSetValid(statefulSet) {
// Perform necessary actions, such as adding the node to the Redis queue
err := redis.Producer(statefulSet.Name, queueK8SNodes)
if err != nil {
log.Error("ERROR adding the node to the queue: ", err)
Expand Down

0 comments on commit 3c5a220

Please sign in to comment.