From 599742b8099ec150dc75d445bc8cc87e0211abfa Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 5 Dec 2024 14:48:36 +0800 Subject: [PATCH] update --- app/task/init.go | 3 --- app/task/md/cron_key.go | 8 ++----- app/task/task_egg_energy_auto_record_price.go | 23 ------------------- app/task/task_egg_energy_deal_fund_data.go | 23 ------------------- ...k_egg_energy_deal_platform_revenue_data.go | 23 ------------------- 5 files changed, 2 insertions(+), 78 deletions(-) delete mode 100644 app/task/task_egg_energy_auto_record_price.go delete mode 100644 app/task/task_egg_energy_deal_fund_data.go delete mode 100644 app/task/task_egg_energy_deal_platform_revenue_data.go diff --git a/app/task/init.go b/app/task/init.go index dee4b35..d6db882 100644 --- a/app/task/init.go +++ b/app/task/init.go @@ -87,9 +87,6 @@ func doTask(fnName string) func() { // 增加自动任务队列 func initTasks() { - jobs[taskMd.CronEggEnergyAutoRecordPrices] = taskEggEnergyAutoRecordPrices - jobs[taskMd.CronEggEnergyDealPlatformRevenueData] = taskEggEnergyDealPlatformRevenueData - jobs[taskMd.CronEggEnergyDealFundData] = taskEggEnergyDealFundData jobs[taskMd.AliyunSmsRecord] = taskAliyunSmsRecord //阿里云短信 jobs[taskMd.JpushRecord] = taskJpushRecord //极光推送 jobs[taskMd.NoLoginSend] = taskNoLoginSend //推送 或短信给 X小时没登陆的用户 diff --git a/app/task/md/cron_key.go b/app/task/md/cron_key.go index 13429f2..061abc9 100644 --- a/app/task/md/cron_key.go +++ b/app/task/md/cron_key.go @@ -1,13 +1,9 @@ package md const ( - CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格 - CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益 - CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入 - AliyunSmsRecord = "cron_egg_aliyun_sms_record" //阿里云短信 - JpushRecord = "cron_egg_jpush_record" //极光推送 + AliyunSmsRecord = "cron_egg_aliyun_sms_record" //阿里云短信 + JpushRecord = "cron_egg_jpush_record" //极光推送 NoLoginSend = "cron_egg_no_login_send" //推送 或短信给 X小时没登陆的用户 NoSignSend = "cron_egg_no_sign_send" //推送 或短信给 X小时没签到的用户 - ) diff --git a/app/task/task_egg_energy_auto_record_price.go b/app/task/task_egg_energy_auto_record_price.go deleted file mode 100644 index 6872a36..0000000 --- a/app/task/task_egg_energy_auto_record_price.go +++ /dev/null @@ -1,23 +0,0 @@ -package task - -import ( - "applet/app/task/svc" - "math/rand" - "time" - "xorm.io/xorm" -) - -// 自动记录价格 -func taskEggEnergyAutoRecordPrices(eg *xorm.Engine) { - for { - if len(ch) > workerNum { - time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) - } else { - goto START - } - } -START: - ch <- 1 - svc.EggEnergyAutoRecordPrices(eg) - <-ch -} diff --git a/app/task/task_egg_energy_deal_fund_data.go b/app/task/task_egg_energy_deal_fund_data.go deleted file mode 100644 index 94f442d..0000000 --- a/app/task/task_egg_energy_deal_fund_data.go +++ /dev/null @@ -1,23 +0,0 @@ -package task - -import ( - "applet/app/task/svc" - "math/rand" - "time" - "xorm.io/xorm" -) - -// 处理价值投入 -func taskEggEnergyDealFundData(eg *xorm.Engine) { - for { - if len(ch) > workerNum { - time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) - } else { - goto START - } - } -START: - ch <- 1 - svc.EggEnergyDealFundData(eg) - <-ch -} diff --git a/app/task/task_egg_energy_deal_platform_revenue_data.go b/app/task/task_egg_energy_deal_platform_revenue_data.go deleted file mode 100644 index f3e132b..0000000 --- a/app/task/task_egg_energy_deal_platform_revenue_data.go +++ /dev/null @@ -1,23 +0,0 @@ -package task - -import ( - "applet/app/task/svc" - "math/rand" - "time" - "xorm.io/xorm" -) - -// 处理平台收益 -func taskEggEnergyDealPlatformRevenueData(eg *xorm.Engine) { - for { - if len(ch) > workerNum { - time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) - } else { - goto START - } - } -START: - ch <- 1 - svc.EggEnergyDealPlatformRevenueData(eg) - <-ch -}