test g withdraw

This commit is contained in:
shoopea 2020-01-13 16:59:00 +08:00
parent b422b37eb4
commit 264fe74c38

13
job.go
View File

@ -1434,6 +1434,19 @@ func jobGWithdraw(j Job) {
}
if j.Trigger != 0 {
id, err := getObjSubType(j.Trigger)
logOnError(err, "jobGWithdraw : getObjSubType("+strconv.FormatInt(j.Trigger, 10)+")")
if err == nil && id == cacheObjSubType[`msg_gstock_any_ack`] {
p2 := JobPayloadMsgDel{
Delay: (10 * time.Second),
ObjMsgID64: j.Trigger,
}
b2, _ := json.Marshal(p2)
createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().UTC(), b2)
}
}
if (p.Status & reqTab[cacheObjSubType[`item_res`]]) == reqTab[cacheObjSubType[`item_res`]] {
log.Printf("jobGWithdraw[%d] : Requesting res.\n", j.ID64)
p.Status = p.Status &^ reqTab[cacheObjSubType[`item_res`]]