test timeout
This commit is contained in:
parent
9399a84094
commit
29df5f268e
2
def.go
2
def.go
@ -9,7 +9,7 @@ import (
|
|||||||
tb "gopkg.in/tucnak/telebot.v2"
|
tb "gopkg.in/tucnak/telebot.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxUnixTimestamp int64 = 253402300799
|
const maxUnixTimestamp int64 = 4102444799
|
||||||
|
|
||||||
type DataBackup struct {
|
type DataBackup struct {
|
||||||
Messages []ChatWarsMessage `json:"messages"`
|
Messages []ChatWarsMessage `json:"messages"`
|
||||||
|
@ -512,7 +512,7 @@ func JobWorker(id int, jobs <-chan Job) {
|
|||||||
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("jobWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
// FIXME : discard timed out jobs
|
// FIXME : discard timed out jobs
|
||||||
for j := range 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) {
|
if time.Now().UTC().Before(j.Timeout) {
|
||||||
switch j.JobTypeID {
|
switch j.JobTypeID {
|
||||||
case objSubTypeJobRescanMsg:
|
case objSubTypeJobRescanMsg:
|
||||||
|
Loading…
Reference in New Issue
Block a user