otto 9 months ago
parent
commit
f7da89e976
  1. 4
      hotspot-clear-job-master.yaml
  2. 5
      task/task.go

4
hotspot-clear-job-master.yaml

@ -4,7 +4,7 @@ metadata:
name: hotspot-clear-job
namespace: master
spec:
schedule: "*/10 * * * *" # 10分钟
schedule: "*/1 * * * *" # 10分钟
# schedule: "0 * * * *" # 一小时
jobTemplate:
spec:
@ -12,7 +12,7 @@ spec:
spec:
containers:
- name: hotspot-clear
image: harbor.homieyy.com/job/master/hotspot-clear:02703570f06903386517338b587d431f4b7c53df
image: harbor.homieyy.com/job/master/hotspot-clear:d82671ebc54911b3c6a0a92191d22f05b99ec01f
env:
- name: JM_ENVIRONMENT
value: master

5
task/task.go

@ -63,7 +63,6 @@ func task(start, end int64) error {
ids []int64
)
for _, val := range result {
if val.Score > 0 {
id, _ := strconv.Atoi(val.Member.(string))
if id != 0 {
@ -101,9 +100,9 @@ func task(start, end int64) error {
}
func wechatHook(times int64, err error) {
envi := "测试"
envi := "测试11"
if k8sclient.Environment() == k8sclient.MasterNamespace {
envi = "正式"
envi = "正式11"
}
hook := wechat.NewMarkdown("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=00dd9216-1f50-42be-8fe1-e66640d7bb27").
Title(1, "直播间热度清理").Br().

Loading…
Cancel
Save