|
@@ -2,13 +2,13 @@ package main
|
|
|
|
|
|
import (
|
|
import (
|
|
utils "app.yhyue.com/data_processing/common_utils"
|
|
utils "app.yhyue.com/data_processing/common_utils"
|
|
- "app.yhyue.com/data_processing/common_utils/log"
|
|
|
|
- "app.yhyue.com/data_processing/common_utils/mongodb"
|
|
|
|
- "app.yhyue.com/data_processing/common_utils/mysqldb"
|
|
|
|
"context"
|
|
"context"
|
|
"fmt"
|
|
"fmt"
|
|
"github.com/robfig/cron/v3"
|
|
"github.com/robfig/cron/v3"
|
|
"go.uber.org/zap"
|
|
"go.uber.org/zap"
|
|
|
|
+ "jygit.jydev.jianyu360.cn/data_processing/common_utils/log"
|
|
|
|
+ "jygit.jydev.jianyu360.cn/data_processing/common_utils/mongodb"
|
|
|
|
+ "jygit.jydev.jianyu360.cn/data_processing/common_utils/mysqldb"
|
|
"sync"
|
|
"sync"
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
@@ -360,9 +360,6 @@ func dealProject() {
|
|
total := 0
|
|
total := 0
|
|
for rows.Next() {
|
|
for rows.Next() {
|
|
total++
|
|
total++
|
|
- if total%100 == 0 {
|
|
|
|
- log.Info("dealProject", zap.Int("current", total))
|
|
|
|
- }
|
|
|
|
scanArgs := make([]interface{}, len(columns))
|
|
scanArgs := make([]interface{}, len(columns))
|
|
values := make([]interface{}, len(columns))
|
|
values := make([]interface{}, len(columns))
|
|
ret := make(map[string]interface{})
|
|
ret := make(map[string]interface{})
|
|
@@ -389,6 +386,10 @@ func dealProject() {
|
|
buyerPool <- true
|
|
buyerPool <- true
|
|
wg.Add(1)
|
|
wg.Add(1)
|
|
|
|
|
|
|
|
+ if total%100 == 0 {
|
|
|
|
+ log.Info("dealProject", zap.Int("current", total), zap.Any("bidding_id", ret["bidding_id"]))
|
|
|
|
+ }
|
|
|
|
+
|
|
go func(tmp map[string]interface{}) {
|
|
go func(tmp map[string]interface{}) {
|
|
defer func() {
|
|
defer func() {
|
|
<-buyerPool
|
|
<-buyerPool
|
|
@@ -404,6 +405,7 @@ func dealProject() {
|
|
rows.Close()
|
|
rows.Close()
|
|
wg.Wait()
|
|
wg.Wait()
|
|
|
|
|
|
|
|
+ log.Info("dealProject", zap.String("deal", "over"))
|
|
}
|
|
}
|
|
|
|
|
|
func updateProject(tmp map[string]interface{}) {
|
|
func updateProject(tmp map[string]interface{}) {
|