From 69ea336e44c26c301aae3fe9e25746b6d29df864 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Sat, 22 Dec 2018 04:13:21 +0800 Subject: [PATCH] =?UTF-8?q?ADDataSave=20=E8=BF=94=E5=9B=9E=E6=88=90?= =?UTF-8?q?=E8=B4=A5=E5=80=BC=20bool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task.go | 6 +++++- test.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/task.go b/task.go index 592cb89..9745e06 100644 --- a/task.go +++ b/task.go @@ -132,7 +132,7 @@ func (task *Task) Session() *requests.Session { } // ADDataSave 公众存储数据的接口 -func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) { +func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) bool { if len(adDataList) != 0 { adDataStore, err := json.Marshal(adDataList) if err != nil { @@ -149,5 +149,9 @@ func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) { adinfo := task.GetADInfo() db.ADInsert(uid.String(), adinfo.Device, adinfo.Platform, adinfo.AreaCC, "", string(adDataStore), adinfo.SpiderID, adinfo.Channel, adinfo.Media, adinfo.CatchAccountID, 0, adinfo.Priority, time.Now()) + + return true } + + return false } diff --git a/test.yaml b/test.yaml index 85f58d4..78242df 100644 --- a/test.yaml +++ b/test.yaml @@ -18,4 +18,4 @@ media : 55 spider_id : 73 catch_account_id : 123 -crontab: "1s" \ No newline at end of file +crontab: "2s" \ No newline at end of file