Eliminate running paths of Predicates in scheduler
- eliminate running paths of Predicates in scheduler; use Filter Plugins instead. - refactor all unit tests - adjust the TestPreemptWithPermitPlugin integration test
This commit is contained in:
@@ -124,3 +124,13 @@ func PredicateMetadata(state *framework.CycleState) interface{} {
|
||||
}
|
||||
return meta
|
||||
}
|
||||
|
||||
// CovertStateRefToPredMeta checks if 'stateRef' is nil, if it is, return nil;
|
||||
// otherwise covert it to predicates metadata and return.
|
||||
func CovertStateRefToPredMeta(stateRef interface{}) (predicates.Metadata, bool) {
|
||||
if stateRef == nil {
|
||||
return nil, true
|
||||
}
|
||||
meta, ok := stateRef.(predicates.Metadata)
|
||||
return meta, ok
|
||||
}
|
||||
|
Reference in New Issue
Block a user