mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-03 20:27:46 +08:00
Merge pull request #424 from GLYASAI/podevent
[REV] do not record event in 10 min
This commit is contained in:
commit
8a579ff91f
@ -70,6 +70,11 @@ func (p *PodEvent) Handle() {
|
||||
for {
|
||||
select {
|
||||
case pod := <-p.podEventCh:
|
||||
// do not record events that occur 10 minutes after startup
|
||||
if time.Now().Sub(pod.CreationTimestamp.Time) > 10 * time.Minute {
|
||||
continue
|
||||
}
|
||||
|
||||
recordUpdateEvent(p.clientset, pod, defDetermineOptType)
|
||||
case <-p.stopCh:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user