fix delay
This commit is contained in:
parent
0d50ea9ed4
commit
2471348dff
22
job.go
22
job.go
@ -761,7 +761,7 @@ func jobGDeposit(j Job) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Printf("jobGDeposit : Sending messages.\n")
|
log.Printf("jobGDeposit : Sending messages.\n")
|
||||||
var delay int64 = 0
|
var delay time.Duration = 10 * time.Second
|
||||||
var b []byte
|
var b []byte
|
||||||
if res || alch || misc || craft || equip {
|
if res || alch || misc || craft || equip {
|
||||||
p.Status = 1
|
p.Status = 1
|
||||||
@ -770,37 +770,37 @@ func jobGDeposit(j Job) {
|
|||||||
if res {
|
if res {
|
||||||
log.Printf("jobGDeposit : Sending res.\n")
|
log.Printf("jobGDeposit : Sending res.\n")
|
||||||
clientSendCWMsgDelay(p.ChatID64, `📦Resources`, delay)
|
clientSendCWMsgDelay(p.ChatID64, `📦Resources`, delay)
|
||||||
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, (10+delay)*time.Second)
|
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, delay)
|
||||||
logOnError(err, "jobGDeposit : createJobCallback")
|
logOnError(err, "jobGDeposit : createJobCallback")
|
||||||
delay = delay + 2
|
delay = delay + 2*time.Second
|
||||||
}
|
}
|
||||||
if alch {
|
if alch {
|
||||||
log.Printf("jobGDeposit : Sending alch.\n")
|
log.Printf("jobGDeposit : Sending alch.\n")
|
||||||
clientSendCWMsgDelay(p.ChatID64, `⚗️Alchemy`, delay)
|
clientSendCWMsgDelay(p.ChatID64, `⚗️Alchemy`, delay)
|
||||||
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, (10+delay)*time.Second)
|
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, delay)
|
||||||
logOnError(err, "jobGDeposit : createJobCallback")
|
logOnError(err, "jobGDeposit : createJobCallback")
|
||||||
delay = delay + 2
|
delay = delay + 2*time.Second
|
||||||
}
|
}
|
||||||
if misc {
|
if misc {
|
||||||
log.Printf("jobGDeposit : Sending misc.\n")
|
log.Printf("jobGDeposit : Sending misc.\n")
|
||||||
clientSendCWMsgDelay(p.ChatID64, `🗃Misc`, delay)
|
clientSendCWMsgDelay(p.ChatID64, `🗃Misc`, delay)
|
||||||
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, (10+delay)*time.Second)
|
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, delay)
|
||||||
logOnError(err, "jobGDeposit : createJobCallback")
|
logOnError(err, "jobGDeposit : createJobCallback")
|
||||||
delay = delay + 2
|
delay = delay + 2*time.Second
|
||||||
}
|
}
|
||||||
if craft {
|
if craft {
|
||||||
log.Printf("jobGDeposit : Sending craft.\n")
|
log.Printf("jobGDeposit : Sending craft.\n")
|
||||||
clientSendCWMsgDelay(p.ChatID64, `⚒Crafting`, delay)
|
clientSendCWMsgDelay(p.ChatID64, `⚒Crafting`, delay)
|
||||||
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, (10+delay)*time.Second)
|
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, delay)
|
||||||
logOnError(err, "jobGDeposit : createJobCallback")
|
logOnError(err, "jobGDeposit : createJobCallback")
|
||||||
delay = delay + 2
|
delay = delay + 2*time.Second
|
||||||
}
|
}
|
||||||
if equip {
|
if equip {
|
||||||
log.Printf("jobGDeposit : Sending equip.\n")
|
log.Printf("jobGDeposit : Sending equip.\n")
|
||||||
clientSendCWMsgDelay(p.ChatID64, `🏷Equipment`, delay)
|
clientSendCWMsgDelay(p.ChatID64, `🏷Equipment`, delay)
|
||||||
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, (10+delay)*time.Second)
|
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, b, delay)
|
||||||
logOnError(err, "jobGDeposit : createJobCallback")
|
logOnError(err, "jobGDeposit : createJobCallback")
|
||||||
delay = delay + 2
|
delay = delay + 2*time.Second
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user