ADDataSave 返回成败值 bool

This commit is contained in:
eson 2018-12-22 04:13:21 +08:00
parent e0429c02c1
commit 69ea336e44
2 changed files with 6 additions and 2 deletions

View File

@ -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
}

View File

@ -18,4 +18,4 @@ media : 55
spider_id : 73
catch_account_id : 123
crontab: "1s"
crontab: "2s"