v1.27.0-a #10
@ -233,7 +233,7 @@ func (e *TaskEngine) followWorkInDB() {
|
|||||||
for fromName, srcs := range e.follows {
|
for fromName, srcs := range e.follows {
|
||||||
var cList []int // Which work is done (that we follow) since we last checked?
|
var cList []int // Which work is done (that we follow) since we last checked?
|
||||||
err := e.db.Select(e.ctx, &cList, `SELECT h.task_id FROM harmony_task_history
|
err := e.db.Select(e.ctx, &cList, `SELECT h.task_id FROM harmony_task_history
|
||||||
WHERE h.work_end>$1 AND h.name=$2`, lastFollowTime, fromName)
|
WHERE h.work_end>$1 AND h.name=$2`, lastFollowTime.UTC(), fromName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Could not query DB: ", err)
|
log.Error("Could not query DB: ", err)
|
||||||
return
|
return
|
||||||
|
@ -218,7 +218,7 @@ retryRecordCompletion:
|
|||||||
}
|
}
|
||||||
_, err = tx.Exec(`INSERT INTO harmony_task_history
|
_, err = tx.Exec(`INSERT INTO harmony_task_history
|
||||||
(task_id, name, posted, work_start, work_end, result, completed_by_host_and_port, err)
|
(task_id, name, posted, work_start, work_end, result, completed_by_host_and_port, err)
|
||||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`, tID, h.Name, postedTime, workStart, workEnd, done, h.TaskEngine.hostAndPort, result)
|
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`, tID, h.Name, postedTime.UTC(), workStart.UTC(), workEnd.UTC(), done, h.TaskEngine.hostAndPort, result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, fmt.Errorf("could not write history: %w", err)
|
return false, fmt.Errorf("could not write history: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user