fix jobs
This commit is contained in:
parent
25e44c0a81
commit
bb14f6a1cf
12
job.go
12
job.go
@ -83,8 +83,8 @@ func setJobTimeout(jobID64 int64, d time.Duration) error {
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
_, err = stmt.Exec(time.Now().UTC().Add(d), jobId)
|
||||
s := fmt.Sprintf("setJobTimeout, update obj_job(%d)", jobId)
|
||||
_, err = stmt.Exec(time.Now().UTC().Add(d), jobID64)
|
||||
s := fmt.Sprintf("setJobTimeout, update obj_job(%d)", jobID64)
|
||||
logOnError(err, s)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -93,7 +93,7 @@ func setJobTimeout(jobID64 int64, d time.Duration) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func setJobDone(jobId int64) error {
|
||||
func setJobDone(jobID64 int64) error {
|
||||
stmt, err := db.Prepare(`UPDATE obj_job j SET j.is_done = 1, j.in_work = 0, j.ended = ? WHERE j.obj_id = ?;`)
|
||||
logOnError(err, "setJobDone : prepare update obj_job")
|
||||
if err != nil {
|
||||
@ -101,8 +101,8 @@ func setJobDone(jobId int64) error {
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
_, err = stmt.Exec(time.Now().UTC(), jobId)
|
||||
s := fmt.Sprintf("setJobDone, update obj_job(%d)", jobId)
|
||||
_, err = stmt.Exec(time.Now().UTC(), jobID64)
|
||||
s := fmt.Sprintf("setJobDone, update obj_job(%d)", jobID64)
|
||||
logOnError(err, s)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -762,7 +762,7 @@ func jobGDeposit(j Job) {
|
||||
}
|
||||
log.Printf("jobGDeposit : Sending messages.\n")
|
||||
var delay int64 = 0
|
||||
var b []string
|
||||
var b []byte
|
||||
if res || alch || misc || craft || equip {
|
||||
p.Status = 1
|
||||
b, _ = json.Marshal(&p)
|
||||
|
Loading…
Reference in New Issue
Block a user