Parcourir la source

更新

master
huangjiajun il y a 1 mois
Parent
révision
ab3a7636d6
3 fichiers modifiés avec 27 ajouts et 4 suppressions
  1. +5
    -4
      app/task/init.go
  2. +1
    -0
      app/task/md/cron_key.go
  3. +21
    -0
      app/task/task_tik_tok_chanxuan_pay.go

+ 5
- 4
app/task/init.go Voir le fichier

@@ -90,10 +90,11 @@ func initTasks() {
jobs[taskMd.ZhimengCronCinema5bmsOrder] = taskCinema5bmsOrder //
jobs[taskMd.ZhimengCronCinema5bmsYesterOrder] = taskCinema5bmsYesterOrder //

jobs[taskMd.ZhimengCronTikTokCsjp] = taskTikTokCsjp //
jobs[taskMd.ZhimengCronTikTokCsjpActivity] = taskTikTokCsjpActivity //
jobs[taskMd.ZhimengCronTikTokCsjpLive] = taskTikTokCsjpLive //
jobs[taskMd.ZhimengCronTikTokChanxuan] = taskTikTokCsjpChanxuan //
jobs[taskMd.ZhimengCronTikTokCsjp] = taskTikTokCsjp //
jobs[taskMd.ZhimengCronTikTokCsjpActivity] = taskTikTokCsjpActivity //
jobs[taskMd.ZhimengCronTikTokCsjpLive] = taskTikTokCsjpLive //
jobs[taskMd.ZhimengCronTikTokChanxuan] = taskTikTokCsjpChanxuan //
jobs[taskMd.ZhimengCronTikTokChanxuanPay] = taskTikTokCsjpChanxuanPay //

jobs[taskMd.ZhimengCronTikTokTask] = taskTikTokTask //
jobs[taskMd.ZhimengCronTikTokTaskRelate] = taskTikTokTaskRelate //


+ 1
- 0
app/task/md/cron_key.go Voir le fichier

@@ -4,6 +4,7 @@ const (
ZhimengCronTikTokTaskRelate = "zhimeng_cron_tik_tok_relate"
ZhimengCronTikTokCsjp = "zhimeng_cron_tik_tok_csjp"
ZhimengCronTikTokChanxuan = "zhimeng_cron_tik_tok_chanxuan"
ZhimengCronTikTokChanxuanPay = "zhimeng_cron_tik_tok_chanxuan_pay"
ZhimengCronCinema5bms = "zhimeng_cron_cinema5bms"
ZhimengCronPLayletBihaiOrder = "zhimeng_cron_playlet_bihai_order"
ZhimengCronCinema5bmsOrder = "zhimeng_cron_cinema5bms_order"


+ 21
- 0
app/task/task_tik_tok_chanxuan_pay.go Voir le fichier

@@ -0,0 +1,21 @@
package task

import (
"applet/app/task/svc"
"math/rand"
"time"
)

func taskTikTokCsjpChanxuanPay() {
for {
if len(ch) > workerNum {
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
} else {
goto START
}
}
START:
ch <- 1
svc.TikTokChanxuan(1)
<-ch
}

Chargement…
Annuler
Enregistrer