更改正式环境定时时间为60分钟一次

This commit is contained in:
chejiulong 2023-02-27 18:34:17 +08:00
parent a90d48a795
commit 8357395e1c
3 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -158,7 +158,7 @@ func init() {
insertSize = 500 //一次性入库 insertSize = 500 //一次性入库
insertChanSize = 50 //通道缓冲数 insertChanSize = 50 //通道缓冲数
goSize = 10 //协程数 goSize = 10 //协程数
taskTime = 10 taskTime = 60
default: default:
panic(fmt.Errorf("无效的运行模式: %s", env)) panic(fmt.Errorf("无效的运行模式: %s", env))
} }
@ -204,7 +204,7 @@ func main() {
applogger.Info(fmt.Sprintf("程序启动,加载%s环境....", env)) applogger.Info(fmt.Sprintf("程序启动,加载%s环境....", env))
go downloadDecompression() // 启动立即执行一次 go downloadDecompression() // 启动立即执行一次
ticker := time.NewTicker(time.Duration(taskTime) * time.Minute) // 创建一个定时器,每隔一分钟触发一次任务函数 ticker := time.NewTicker(time.Duration(taskTime) * time.Minute) // 创建一个定时器
tickCount := 2 //记录循环次数 tickCount := 2 //记录循环次数
defer ticker.Stop() // 延迟关闭定时器,确保所有的定时器事件都被处理完毕 defer ticker.Stop() // 延迟关闭定时器,确保所有的定时器事件都被处理完毕
// 循环处理任务 // 循环处理任务