test timeout

This commit is contained in:
shoopea 2019-08-29 18:30:50 +08:00
parent 9399a84094
commit 29df5f268e
2 changed files with 2 additions and 2 deletions

2
def.go
View File

@ -9,7 +9,7 @@ import (
tb "gopkg.in/tucnak/telebot.v2"
)
const maxUnixTimestamp int64 = 253402300799
const maxUnixTimestamp int64 = 4102444799
type DataBackup struct {
Messages []ChatWarsMessage `json:"messages"`

View File

@ -512,7 +512,7 @@ func JobWorker(id int, jobs <-chan Job) {
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
// FIXME : discard timed out jobs
for j := range jobs {
//log.Printf("JobWorker[%d] : Starting job %d.\n", id, j.ID64)
log.Printf("JobWorker[%d] : Starting job %d (timeout : %s).\n", id, j.ID64, j.Timeout.Format(time.RFC3339))
if time.Now().UTC().Before(j.Timeout) {
switch j.JobTypeID {
case objSubTypeJobRescanMsg: