clean up func podTimestamp
This commit is contained in:
		@@ -247,19 +247,6 @@ type PriorityQueue struct {
 | 
				
			|||||||
// Making sure that PriorityQueue implements SchedulingQueue.
 | 
					// Making sure that PriorityQueue implements SchedulingQueue.
 | 
				
			||||||
var _ = SchedulingQueue(&PriorityQueue{})
 | 
					var _ = SchedulingQueue(&PriorityQueue{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// podTimeStamp returns pod's last schedule time or its creation time if the
 | 
					 | 
				
			||||||
// scheduler has never tried scheduling it.
 | 
					 | 
				
			||||||
func podTimestamp(pod *v1.Pod) *metav1.Time {
 | 
					 | 
				
			||||||
	_, condition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
 | 
					 | 
				
			||||||
	if condition == nil {
 | 
					 | 
				
			||||||
		return &pod.CreationTimestamp
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if condition.LastProbeTime.IsZero() {
 | 
					 | 
				
			||||||
		return &condition.LastTransitionTime
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return &condition.LastProbeTime
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// podInfo is minimum cell in the scheduling queue.
 | 
					// podInfo is minimum cell in the scheduling queue.
 | 
				
			||||||
type podInfo struct {
 | 
					type podInfo struct {
 | 
				
			||||||
	pod *v1.Pod
 | 
						pod *v1.Pod
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user