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

4
hotspot-clear-job-master.yaml

@ -4,7 +4,7 @@ metadata:
name: hotspot-clear-job name: hotspot-clear-job
namespace: master namespace: master
spec: spec:
schedule: "*/1 * * * *" # 10分钟 schedule: "*/10 * * * *" # 10分钟
# schedule: "0 * * * *" # 一小时 # schedule: "0 * * * *" # 一小时
successfulJobsHistoryLimit: 3 successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1 failedJobsHistoryLimit: 1
@ -14,7 +14,7 @@ spec:
spec: spec:
containers: containers:
- name: hotspot-clear - name: hotspot-clear
image: 192.168.0.19:5000/job/master/hotspot-clear:bc69c493d2e25b8a3507aa450e9b27d97e2310a3 image: 192.168.0.19:5000/job/master/hotspot-clear:77828635aff0ab0eb0992c381e668db2f29fd979
imagePullPolicy: Always imagePullPolicy: Always
env: env:
- name: JM_ENVIRONMENT - name: JM_ENVIRONMENT

4
task/task.go

@ -100,9 +100,9 @@ func task(start, end int64) error {
} }
func wechatHook(times int64, err error) { func wechatHook(times int64, err error) {
envi := "测试11" envi := "测试"
if k8sclient.Environment() == k8sclient.MasterNamespace { if k8sclient.Environment() == k8sclient.MasterNamespace {
envi = "正式11" envi = "正式"
} }
hook := wechat.NewMarkdown("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=00dd9216-1f50-42be-8fe1-e66640d7bb27"). hook := wechat.NewMarkdown("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=00dd9216-1f50-42be-8fe1-e66640d7bb27").
Title(1, "直播间热度清理").Br(). Title(1, "直播间热度清理").Br().

Loading…
Cancel
Save