diff --git a/app/task/init.go b/app/task/init.go index e2b3a05..e5ed70b 100644 --- a/app/task/init.go +++ b/app/task/init.go @@ -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 // diff --git a/app/task/md/cron_key.go b/app/task/md/cron_key.go index de05ae0..4b79632 100644 --- a/app/task/md/cron_key.go +++ b/app/task/md/cron_key.go @@ -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" diff --git a/app/task/task_tik_tok_chanxuan_pay.go b/app/task/task_tik_tok_chanxuan_pay.go new file mode 100644 index 0000000..f529ae0 --- /dev/null +++ b/app/task/task_tik_tok_chanxuan_pay.go @@ -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 +}