mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 18:58:02 +08:00
[FIX] fix service status bug when app is not build
This commit is contained in:
parent
ec6103da63
commit
c211d813bd
@ -116,14 +116,18 @@ func (s *Manager) checkStatus() {
|
||||
deployInfo, err := db.GetManager().K8sDeployReplicationDao().GetK8sDeployReplicationByService(serviceID)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
s.SetStatus(serviceID, CLOSED)
|
||||
if s.GetStatus(serviceID) != UNDEPLOY && s.GetStatus(serviceID) != DEPLOYING {
|
||||
s.SetStatus(serviceID, CLOSED)
|
||||
}
|
||||
continue
|
||||
}
|
||||
logrus.Error("get deploy info error where check application status.", err.Error())
|
||||
continue
|
||||
}
|
||||
if deployInfo == nil || len(deployInfo) == 0 {
|
||||
s.SetStatus(serviceID, CLOSED)
|
||||
if s.GetStatus(serviceID) != UNDEPLOY && s.GetStatus(serviceID) != DEPLOYING {
|
||||
s.SetStatus(serviceID, CLOSED)
|
||||
}
|
||||
continue
|
||||
}
|
||||
switch deployInfo[0].ReplicationType {
|
||||
|
Loading…
Reference in New Issue
Block a user