debug timeout
This commit is contained in:
parent
5022f97e6f
commit
0de365d4f8
5
job.go
5
job.go
@ -80,6 +80,8 @@ func setJobCallback(jobID64 int64, userID64 int64, msgTypeID64 int64) {
|
||||
}
|
||||
|
||||
func setJobTimeout(jobID64 int64, d time.Duration) error {
|
||||
log.Printf("setJobTimeout(%d) : %s.\n", jobID64, time.Now().UTC().Add(d))
|
||||
|
||||
stmt, err := db.Prepare(`UPDATE obj_job j SET j.timeout = ? WHERE j.obj_id = ?;`)
|
||||
logOnError(err, "setJobTimeout : prepare update obj_job")
|
||||
if err != nil {
|
||||
@ -88,8 +90,7 @@ func setJobTimeout(jobID64 int64, d time.Duration) error {
|
||||
defer stmt.Close()
|
||||
|
||||
_, err = stmt.Exec(time.Now().UTC().Add(d), jobID64)
|
||||
s := fmt.Sprintf("setJobTimeout, update obj_job(%d)", jobID64)
|
||||
logOnError(err, s)
|
||||
logOnError(err, fmt.Sprintf("setJobTimeout, update obj_job(%d)", jobID64))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user