testupdate get stash

This commit is contained in:
shoopea 2020-06-21 13:04:50 +02:00
parent a68e5b0f73
commit 9703bb19b2

15
job.go
View File

@ -2112,13 +2112,14 @@ func jobGetStash(j Job) {
busyUntil time.Time = time.Now().UTC() busyUntil time.Time = time.Now().UTC()
) )
for _, id := range p.ClientID64 { for _, id := range p.ClientID64 {
clt, ok := getLockedClient(id, false) if clt, ok := getLockedClient(id, false); ok {
if userID64 == 0 { if userID64 == 0 {
userID64 = clt.TGUserID64 userID64 = clt.TGUserID64
busyUntil = clt.CWBusyUntil busyUntil = clt.CWBusyUntil
} else if busyUntil.After(clt.CWBusyUntil) { } else if busyUntil.After(clt.CWBusyUntil) {
userID64 = clt.TGUserID64 userID64 = clt.TGUserID64
busyUntil = clt.CWBusyUntil busyUntil = clt.CWBusyUntil
}
} }
} }
setJobCallback(j.ID64, userID64, cacheObjSubType[`msg_exchange_req`]) setJobCallback(j.ID64, userID64, cacheObjSubType[`msg_exchange_req`])