mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 19:57:42 +08:00
[ADD] add debug messages
This commit is contained in:
parent
b8ee1f2fed
commit
4d2d9ac21b
@ -21,6 +21,7 @@ package v1
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"github.com/Sirupsen/logrus"
|
||||
"time"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
@ -35,12 +36,15 @@ func (a *AppService) IsEmpty() bool {
|
||||
//IsClosed is closed
|
||||
func (a *AppService) IsClosed() bool {
|
||||
if a.IsEmpty() && a.statefulset == nil && a.deployment == nil {
|
||||
logrus.Debugf("a.IsEmpty() && a.statefulset == nil && a.deployment == nil")
|
||||
return true
|
||||
}
|
||||
if a.IsEmpty() && a.statefulset != nil && a.statefulset.ResourceVersion == "" {
|
||||
logrus.Debugf("a.IsEmpty() && a.statefulset != nil && a.statefulset.ResourceVersion == \"\"")
|
||||
return true
|
||||
}
|
||||
if a.IsEmpty() && a.deployment != nil && a.deployment.ResourceVersion == "" {
|
||||
logrus.Debugf("a.IsEmpty() && a.deployment != nil && a.deployment.ResourceVersion == \"\"")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -329,6 +329,7 @@ func (m *Manager) applyRuleExec(task *model.Task) error {
|
||||
}
|
||||
logger := event.GetManager().GetLogger(body.EventID)
|
||||
oldAppService := m.store.GetAppService(body.ServiceID)
|
||||
logrus.Debugf("oldAppService: %v", oldAppService)
|
||||
if (oldAppService == nil || oldAppService.IsClosed()) && !strings.Contains(body.Action, "port") {
|
||||
logrus.Debugf("service is closed,no need handle")
|
||||
logger.Info("service is closed,no need handle", controller.GetLastLoggerOption())
|
||||
|
Loading…
Reference in New Issue
Block a user