Skip to content

Commit

Permalink
feat(torch): reorder imports
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 14, 2023
1 parent e7712e4 commit 87a2c3f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/k8s/statefulsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,11 @@ func WatchStatefulSets() error {
// 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 87a2c3f

Please sign in to comment.