update g deposit all
This commit is contained in:
parent
ebf928ca57
commit
10c342f472
7
job.go
7
job.go
@ -740,13 +740,12 @@ func jobGDepositForward(j Job) {
|
||||
cwm, err := parseSubTypeMessageGDepositAck(msg, rule.re)
|
||||
|
||||
if cwm.ItemID64 == p.ItemID64 && cwm.Quantity == p.Quantity {
|
||||
log.Printf("jobGDepositForward : match (%d / %d).\n", cwm.ItemID64, cwm.Quantity)
|
||||
//log.Printf("jobGDepositForward : match (%d / %d).\n", cwm.ItemID64, cwm.Quantity)
|
||||
clientFwdCWMsg(j.UserID64, cwm.Msg.ID64, cwm.Msg.ChatID64, cfg.Bot.Depositchat)
|
||||
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobGDeposit : setJobDone")
|
||||
} else {
|
||||
log.Printf("jobGDepositForward : found (%d / %d), expected (%d / %d).\n", cwm.ItemID64, cwm.Quantity, p.ItemID64, p.Quantity)
|
||||
//log.Printf("jobGDepositForward : found (%d / %d), expected (%d / %d).\n", cwm.ItemID64, cwm.Quantity, p.ItemID64, p.Quantity)
|
||||
err = rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
|
||||
logOnError(err, "jobGDepositForward : rescheduleJob")
|
||||
setJobCallback(j.ID64, j.UserID64, objSubTypeMessageGDepositAck)
|
||||
@ -849,7 +848,7 @@ func jobGDeposit(j Job) {
|
||||
for stockIdx := range cwm.Stock {
|
||||
for resIdx := range p.ResObjID64 {
|
||||
if cwm.Stock[stockIdx].ItemID64 == p.ResObjID64[resIdx] {
|
||||
log.Printf("jobGDeposit : objSubTypeMessageStockAck : Matching ItemID %d (%d).\n", p.ResObjID64[resIdx], cwm.Stock[stockIdx].Quantity)
|
||||
//log.Printf("jobGDeposit : objSubTypeMessageStockAck : Matching ItemID %d (%d).\n", p.ResObjID64[resIdx], cwm.Stock[stockIdx].Quantity)
|
||||
item, _ := getObjItem(p.ResObjID64[resIdx])
|
||||
clientSendCWMsg(p.ChatID64, fmt.Sprintf("/g_deposit %s %d", item.Code, cwm.Stock[stockIdx].Quantity))
|
||||
p2 := JobPayloadGDepositForward{
|
||||
|
Loading…
Reference in New Issue
Block a user