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