|
@@ -739,9 +739,9 @@ func (f *Front) Assign() {
|
|
//recovertime := CreateRecovertime(spiderimportant, priority)
|
|
//recovertime := CreateRecovertime(spiderimportant, priority)
|
|
recovertime := time.Now().Add(24 * 5 * time.Hour).Unix()
|
|
recovertime := time.Now().Add(24 * 5 * time.Hour).Unix()
|
|
set = map[string]interface{}{
|
|
set = map[string]interface{}{
|
|
- //"claimtype": CLAIMTYPECLAIMED,
|
|
|
|
- //"claimtime": now,
|
|
|
|
- //"recovertime": recovertime,
|
|
|
|
|
|
+ "claimtype": CLAIMTYPECLAIMED,
|
|
|
|
+ "claimtime": now,
|
|
|
|
+ "recovertime": recovertime,
|
|
"createuseremail": (*user)["s_email"],
|
|
"createuseremail": (*user)["s_email"],
|
|
"createuser": name,
|
|
"createuser": name,
|
|
"createuserid": userid,
|
|
"createuserid": userid,
|
|
@@ -795,7 +795,6 @@ func (f *Front) Assign() {
|
|
}
|
|
}
|
|
update = append(update, up)
|
|
update = append(update, up)
|
|
}
|
|
}
|
|
- qu.Debug(query)
|
|
|
|
//更新爬虫信息
|
|
//更新爬虫信息
|
|
b := u.MgoEB.UpdateBulk("luaconfig", update...)
|
|
b := u.MgoEB.UpdateBulk("luaconfig", update...)
|
|
//保存认领日志
|
|
//保存认领日志
|
|
@@ -859,8 +858,8 @@ func (f *Front) SpiderUpdatePlatform() {
|
|
//更新状态
|
|
//更新状态
|
|
set["state"] = 0
|
|
set["state"] = 0
|
|
//爬虫认领状态更新
|
|
//爬虫认领状态更新
|
|
- set["claimtype"] = CLAIMTYPECLAIMED
|
|
|
|
- set["claimtime"] = time.Now().Unix()
|
|
|
|
|
|
+ set["claimtype"] = CLAIMTYPEUNCLAIMED
|
|
|
|
+ set["claimtime"] = int64(0)
|
|
set["recovertime"] = int64(0)
|
|
set["recovertime"] = int64(0)
|
|
//换平台爬虫回收,保存日志
|
|
//换平台爬虫回收,保存日志
|
|
recovelog := map[string]interface{}{
|
|
recovelog := map[string]interface{}{
|
|
@@ -1103,8 +1102,8 @@ func (f *Front) UpdateESP() {
|
|
//更新状态
|
|
//更新状态
|
|
set["state"] = 0
|
|
set["state"] = 0
|
|
//爬虫认领状态更新
|
|
//爬虫认领状态更新
|
|
- set["claimtype"] = CLAIMTYPECLAIMED
|
|
|
|
- set["claimtime"] = time.Now().Unix()
|
|
|
|
|
|
+ set["claimtype"] = CLAIMTYPEUNCLAIMED
|
|
|
|
+ set["claimtime"] = int64(0)
|
|
set["recovertime"] = int64(0)
|
|
set["recovertime"] = int64(0)
|
|
//换平台爬虫回收,保存日志
|
|
//换平台爬虫回收,保存日志
|
|
recovelog := map[string]interface{}{
|
|
recovelog := map[string]interface{}{
|