test
This commit is contained in:
parent
9252b41458
commit
c193a96db0
8
job.go
8
job.go
@ -166,7 +166,7 @@ func jobRescan(j Job) {
|
||||
Text: fmt.Sprintf("%d messages processed in %s.", len(ids), time.Since(start)),
|
||||
}
|
||||
b, _ := json.Marshal(p)
|
||||
_, err := createJob(objSubTypeJobSetJobDone, objJobPriorityRescanAllMsg, j.UserID64, time.Now(), b)
|
||||
_, err := createJob(objSubTypeJobSetJobDone, objJobPriorityRescanAllMsg, j.UserID64, time.Now().UTC(), b)
|
||||
logOnError(err, "jobRescan : createJob(objSubTypeJobSetJobDone)")
|
||||
|
||||
} else if len(ids) == 1 {
|
||||
@ -269,7 +269,7 @@ func jobPillage(j Job) {
|
||||
m, err := getObjMsg(ids[0])
|
||||
logOnError(err, "jobPillage : getMsg(objSubTypeMessagePillageGo, objSubTypeMessagePillageTimeout)")
|
||||
if err == nil {
|
||||
if m.Date.Add(60 * time.Second).After(time.Now()) {
|
||||
if m.Date.Add(60 * time.Second).After(time.Now().UTC()) {
|
||||
msgTypeID64, err := getObjSubTypeId(ids[0])
|
||||
logOnError(err, "jobPillage : getObjSubTypeId")
|
||||
if err == nil {
|
||||
@ -347,11 +347,11 @@ func jobPillage(j Job) {
|
||||
}
|
||||
TGCmdQueue <- s
|
||||
}
|
||||
err = rescheduleJob(j.ID64, j.Status+1, time.Now().Add(30*time.Second))
|
||||
err = rescheduleJob(j.ID64, j.Status+1, time.Now().Add(30*time.Second).UTC())
|
||||
logOnError(err, "jobPillage : rescheduleJob(objSubTypeMessageGo)")
|
||||
} else { //no /go in the last 30 sec so we go ahead, send one and reschedule to check again in 25sec
|
||||
clientSendCWMsg(j.UserID64, "/go")
|
||||
err = rescheduleJob(j.ID64, j.Status+1, time.Now().Add(30*time.Second))
|
||||
err = rescheduleJob(j.ID64, j.Status+1, time.Now().Add(30*time.Second).UTC())
|
||||
logOnError(err, "jobPillage : rescheduleJob")
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user