mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-01 11:18:08 +08:00
[FIX] fix app service deploy version failure bug
This commit is contained in:
parent
02a82b15a1
commit
227fa6c546
@ -36,11 +36,11 @@ import (
|
||||
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
|
||||
gclient "github.com/goodrain/rainbond/mq/api/grpc/client"
|
||||
api_db "github.com/goodrain/rainbond/api/db"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
gclient "github.com/goodrain/rainbond/mq/api/grpc/client"
|
||||
core_util "github.com/goodrain/rainbond/util"
|
||||
"github.com/goodrain/rainbond/worker/client"
|
||||
"github.com/goodrain/rainbond/worker/discover/model"
|
||||
@ -1292,7 +1292,7 @@ func (s *ServiceAction) RollBack(rs *api_model.RollbackStruct) error {
|
||||
TenantID: rs.TenantID,
|
||||
ServiceID: rs.ServiceID,
|
||||
EventID: rs.EventID,
|
||||
TaskType: "upgrade",
|
||||
TaskType: "rolling_upgrade",
|
||||
}
|
||||
if err := GetServiceManager().StartStopService(startStopStruct); err != nil {
|
||||
tx.Rollback()
|
||||
|
@ -69,9 +69,8 @@ func InitAppService(dbmanager db.Manager, serviceID string) (*v1.AppService, err
|
||||
func InitCacheAppService(dbmanager db.Manager, serviceID, version, createrID string) (*v1.AppService, error) {
|
||||
appService := &v1.AppService{
|
||||
AppServiceBase: v1.AppServiceBase{
|
||||
ServiceID: serviceID,
|
||||
DeployVersion: version,
|
||||
CreaterID: createrID,
|
||||
ServiceID: serviceID,
|
||||
CreaterID: createrID,
|
||||
},
|
||||
UpgradePatch: make(map[string][]byte, 2),
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ import (
|
||||
func (a *appRuntimeStore) clean() {
|
||||
util.Exec(a.ctx, func() error {
|
||||
a.appServices.Range(func(k, v interface{}) bool {
|
||||
//TODO
|
||||
//appservice := v.(*v1.AppService)
|
||||
//fmt.Println(appservice.String())
|
||||
return true
|
||||
})
|
||||
logrus.Debugf("app store is cleaned")
|
||||
|
@ -382,6 +382,7 @@ func (a *AppService) String() string {
|
||||
return fmt.Sprintf(`
|
||||
-----------------------------------------------------
|
||||
App:%s
|
||||
DeployVersion:%s
|
||||
Statefulset %+v
|
||||
Deployment %+v
|
||||
Pod %d
|
||||
@ -390,6 +391,7 @@ func (a *AppService) String() string {
|
||||
-----------------------------------------------------
|
||||
`,
|
||||
a.ServiceAlias,
|
||||
a.DeployVersion,
|
||||
a.statefulset,
|
||||
a.deployment,
|
||||
len(a.pods),
|
||||
|
Loading…
Reference in New Issue
Block a user