瀏覽代碼

crontab: health score

Yi 1 天之前
父節點
當前提交
646b538b0c
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      .drone.yml
  2. 2 1
      module/crontab/neck_ring_health.go

+ 1 - 1
.drone.yml

@@ -9,7 +9,7 @@ steps:
   - name: clone
     image: alpine/git
     commands:
-      - git clone -b feature/event http://192.168.1.8:3000/xuyiping/kpt-pasture.git
+      - git clone -b ${DRONE_COMMIT_BRANCH} http://192.168.1.8:3000/xuyiping/kpt-pasture.git
       - cp -R kpt-pasture/* ./
   - name: build
     image: plugins/docker:20.14.2

+ 2 - 1
module/crontab/neck_ring_health.go

@@ -107,7 +107,8 @@ func calculateNewScore(data *model.NeckRingHealth) int32 {
 	if data.IsImmunization == pasturePb.IsShow_Ok {
 		otherScore += 12
 	}
-	return data.Score + otherScore
+	// 4分 算法补偿分
+	return data.Score + otherScore + 4
 }
 
 func calculateMilkFilterScore(milkFilter int32, maxHigh int32) int32 {