test
This commit is contained in:
parent
d745d3ed27
commit
2d5415ea4e
4
job.go
4
job.go
@ -10,7 +10,7 @@ func jobRescan(j Job) {
|
||||
err := setJobStart(j.ID64)
|
||||
logOnError(err, "jobRescan : setJobStart")
|
||||
r := JobPayloadRescanMsg{}
|
||||
err = json.Unmarshal(j.payload, &r)
|
||||
err = json.Unmarshal(j.Payload, &r)
|
||||
ids := getSQLListID64(r.Query)
|
||||
if len(ids) > 1 {
|
||||
for _, id := range ids {
|
||||
@ -38,7 +38,7 @@ func jobSetDone(j Job) {
|
||||
err := setJobStart(j.ID64)
|
||||
logOnError(err, "jobSetDone : setJobStart")
|
||||
r := JobPayloadSetDone{}
|
||||
err = json.Unmarshal(j.payload, &r)
|
||||
err = json.Unmarshal(j.Payload, &r)
|
||||
err = setJobDone(r.JobID64)
|
||||
logOnError(err, "jobSetDone : setJobDone(child)")
|
||||
err = setJobDone(j.ID64)
|
||||
|
7
sql.go
7
sql.go
@ -1511,14 +1511,15 @@ func loadCurrentJobs() ([]Job, error) {
|
||||
}
|
||||
|
||||
func getSQLListID64(q string) []int64 {
|
||||
var id int64
|
||||
var (
|
||||
id int64
|
||||
ids []int64
|
||||
)
|
||||
|
||||
rows, err := db.Query(q)
|
||||
s := fmt.Sprintf("getSQLListID64 : Query(%s)", q)
|
||||
logOnError(err, s)
|
||||
|
||||
ids := make([]int64)
|
||||
|
||||
for rows.Next() {
|
||||
err = rows.Scan(&id)
|
||||
logOnError(err, "getSQLListID64 : scan next val")
|
||||
|
Loading…
Reference in New Issue
Block a user