diff --git a/Jenkinsfile b/Jenkinsfile index 16220039..b7441bea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,8 +48,11 @@ pipeline { sh """ # 重启docker compose cd ./jenkins/${ENV:GIT_BRANCH} - docker-compose stop | true - docker-compose up -d + docker-compose stop master | true + docker-compose rm -f master | true + docker-compose stop worker | true + docker-compose rm -f worker | true + docker-compose up -d | true """ } } @@ -57,7 +60,7 @@ pipeline { steps { echo 'Cleanup...' sh """ - docker rmi `docker images | grep '' | grep -v IMAGE | awk '{ print \$3 }' | xargs` + docker rmi -f `docker images | grep '' | grep -v IMAGE | awk '{ print \$3 }' | xargs` """ } } diff --git a/backend/database/pubsub.go b/backend/database/pubsub.go index 27b10687..b100535f 100644 --- a/backend/database/pubsub.go +++ b/backend/database/pubsub.go @@ -32,6 +32,7 @@ func (c *Subscriber) Connect() { log.Debug("wait...") switch res := c.client.Receive().(type) { case redis.Message: + i = 0 channel := (*string)(unsafe.Pointer(&res.Channel)) message := (*string)(unsafe.Pointer(&res.Data)) c.cbMap[*channel](*channel, *message) @@ -39,17 +40,17 @@ func (c *Subscriber) Connect() { fmt.Printf("%s: %s %d\n", res.Channel, res.Kind, res.Count) case error: log.Error("error handle redis connection...") - con, err := GetRedisConn() - if err != nil { - log.Fatal("redis dial failed") - continue - } - c.client = redis.PubSubConn{Conn: con} - c.cbMap = make(map[string]SubscribeCallback) + time.Sleep(2 * time.Second) if i > 5 { panic(errors.New("redis connection failed too many times, panic")) } + con, err := GetRedisConn() + if err != nil { + log.Error("redis dial failed") + continue + } + c.client = redis.PubSubConn{Conn: con} i += 1 continue diff --git a/frontend/src/assets/logo.svg b/frontend/src/assets/logo.svg new file mode 100644 index 00000000..b0e23910 --- /dev/null +++ b/frontend/src/assets/logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js index c8573bd4..b1de3b47 100644 --- a/frontend/src/i18n/zh.js +++ b/frontend/src/i18n/zh.js @@ -214,6 +214,7 @@ export default { // 下拉框 User: '用户', Logout: '退出登录', + Documentation: '文档', // 选择 'Yes': '是', diff --git a/frontend/src/views/layout/components/Navbar.vue b/frontend/src/views/layout/components/Navbar.vue index 976d98d9..f60c0051 100644 --- a/frontend/src/views/layout/components/Navbar.vue +++ b/frontend/src/views/layout/components/Navbar.vue @@ -30,7 +30,7 @@ - 文档 + {{$t('Documentation')}} diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index 195ae1de..a21c0f42 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -4,7 +4,7 @@