backward compatible from ID to uid for sent_jobs
parent
d7339c855e
commit
ae4c5bd886
4
main.go
4
main.go
|
|
@ -345,7 +345,7 @@ func updateDeadJobs(jobs []broker.Job) error {
|
|||
wouldBe := strings.TrimPrefix(listEntry, "sent_job_")
|
||||
found := false
|
||||
for i := range jobs {
|
||||
found = found || jobs[i].ID == wouldBe
|
||||
found = found || jobs[i].UID() == wouldBe || jobs[i].ID == wouldBe
|
||||
}
|
||||
logtr.Debugf("found job %s to be still alive==%v", wouldBe, found)
|
||||
if !found {
|
||||
|
|
@ -420,7 +420,7 @@ func sendJob(job broker.Job) (bool, error) {
|
|||
logtr.Errorf("failed to marshal recorded job: %v", err)
|
||||
return
|
||||
}
|
||||
if err := db.Set("sent_job_"+job.ID, b); err != nil {
|
||||
if err := db.Set("sent_job_"+job.UID(), b); err != nil {
|
||||
logtr.Errorf("failed to set recorded job: %v", err)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
11
todo.yaml
11
todo.yaml
|
|
@ -1,20 +1,21 @@
|
|||
todo:
|
||||
- !states emits current state
|
||||
- TEST. Just like, refactor and test to shit.
|
||||
- try search ntg by autoinc?
|
||||
- fast exact is dumb or...?
|
||||
- modify old items once no longer available; drop stale jobs good candidate but requires new matrix interaction
|
||||
- more than NTG; blue one
|
||||
- !states emits current state
|
||||
- test each !command callbacks to matrix
|
||||
- recv-as for clients so pa receives mas commands as writes
|
||||
- continuation is garbo, but I can still do better client side to avoid get-set high level
|
||||
- no hard code jpeg or have it in multiple places
|
||||
- change matrix so I test my custom logic even if I dont fetch remote
|
||||
- warn/err/etc. on clobbering ids.matrix since clients can mess with one another
|
||||
- modify old items once no longer available; drop stale jobs good candidate but requires new matrix interaction
|
||||
- more than NTG
|
||||
- todo: filter out jobs like CA
|
||||
subtasks:
|
||||
- banlist criteria like vendors, brokers, metadata
|
||||
- set up copy for caleb, broc
|
||||
done:
|
||||
- try search ntg by autoinc?
|
||||
- TEST. Just like, refactor and test to shit.
|
||||
- mark jobs no longer avail by modifying in matrix;; save matrix ID over dummy payload
|
||||
- TEST its falling apart
|
||||
- help() log on truckstop for stuff like perma 403
|
||||
|
|
|
|||
Loading…
Reference in New Issue