fix unique
This commit is contained in:
parent
1c28877a71
commit
9b5fac7dde
43
job.go
43
job.go
@ -1530,30 +1530,31 @@ func jobGWithdraw(j Job) {
|
||||
b2, _ := json.Marshal(p2)
|
||||
createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().UTC(), b2)
|
||||
|
||||
for k, req := range p.Items {
|
||||
if req.Inspect {
|
||||
p2 = JobPayloadMsgDel{
|
||||
MsgTypeID64: cacheObjSubType[`msg_g_inspect_req`],
|
||||
Delay: (10 * time.Second),
|
||||
ObjMsgID64: 0,
|
||||
if isUnique {
|
||||
for k, req := range p.Items {
|
||||
if req.Inspect {
|
||||
p2 = JobPayloadMsgDel{
|
||||
MsgTypeID64: cacheObjSubType[`msg_g_inspect_req`],
|
||||
Delay: (10 * time.Second),
|
||||
ObjMsgID64: 0,
|
||||
}
|
||||
b2, _ = json.Marshal(p2)
|
||||
createJobCallback(cacheObjSubType[`job_msg_del`], j.UserID64, p2.MsgTypeID64, b2, time.Minute)
|
||||
|
||||
p.Inspecting = req.Code
|
||||
b, _ := json.Marshal(p)
|
||||
|
||||
id, err := createJob(cacheObjSubType[`job_gwithdraw`], objJobPriority, j.UserID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), b)
|
||||
logOnError(err, "jobGWithdraw : createJob")
|
||||
setJobCallback(id, int64(bot.Me.ID), cacheObjSubType[`msg_invalid_action`])
|
||||
setJobCallback(id, int64(bot.Me.ID), cacheObjSubType[`msg_inspect_ack`])
|
||||
clientSendCWMsg(j.UserID64, fmt.Sprintf("/g_inspect_%s", p.Inspecting))
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobGWithdraw : setJobDone")
|
||||
return
|
||||
}
|
||||
b2, _ = json.Marshal(p2)
|
||||
createJobCallback(cacheObjSubType[`job_msg_del`], j.UserID64, p2.MsgTypeID64, b2, time.Minute)
|
||||
|
||||
p.Inspecting = req.Code
|
||||
b, _ := json.Marshal(p)
|
||||
|
||||
id, err := createJob(cacheObjSubType[`job_gwithdraw`], objJobPriority, j.UserID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), b)
|
||||
logOnError(err, "jobGWithdraw : createJob")
|
||||
setJobCallback(id, int64(bot.Me.ID), cacheObjSubType[`msg_invalid_action`])
|
||||
setJobCallback(id, int64(bot.Me.ID), cacheObjSubType[`msg_inspect_ack`])
|
||||
clientSendCWMsg(j.UserID64, fmt.Sprintf("/g_inspect_%s", p.Inspecting))
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobGWithdraw : setJobDone")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if id == cacheObjSubType[`msg_msg_job_gwithdraw_ack`] {
|
||||
|
Loading…
Reference in New Issue
Block a user