mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[FIX] clean manager does not work
This commit is contained in:
parent
21a0a6f456
commit
9af4d32594
@ -78,7 +78,7 @@ func (a *Builder) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&a.RunMode, "run", "sync", "sync data when worker start")
|
||||
fs.StringVar(&a.DockerEndpoint, "dockerd", "127.0.0.1:2376", "dockerd endpoint")
|
||||
fs.StringVar(&a.HostIP, "hostIP", "", "Current node Intranet IP")
|
||||
fs.BoolVar(&a.CleanUp, "clean-up", false, "Turn on build version cleanup")
|
||||
fs.BoolVar(&a.CleanUp, "clean-up", true, "Turn on build version cleanup")
|
||||
fs.StringVar(&a.Topic, "topic", "builder", "Topic in mq,you coule choose `builder` or `windows_builder`")
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,8 @@ func (c *VersionInfoDaoImpl) DeleteFailureVersionInfo(timePoint time.Time, statu
|
||||
//SearchVersionInfo query version count >5
|
||||
func (c *VersionInfoDaoImpl) SearchVersionInfo() ([]*model.VersionInfo, error) {
|
||||
var result []*model.VersionInfo
|
||||
if err := c.DB.Table("version_info").Select("service_id").Group("service_id").Having("count(ID) > ?", 5).Scan(&result).Error; err != nil {
|
||||
versionInfo := &model.VersionInfo{}
|
||||
if err := c.DB.Table(versionInfo.TableName()).Select("service_id").Group("service_id").Having("count(ID) > ?", 5).Scan(&result).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
|
Loading…
Reference in New Issue
Block a user