X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fa74a8d2176d115f21554e1e929a35729173a3c3..c68e4ba51336a871dff26ae9f8dc7eb7e316083d:/lib/lsf/lsfqueue.go diff --git a/lib/lsf/lsfqueue.go b/lib/lsf/lsfqueue.go index 971bdd4214..60f01640a0 100644 --- a/lib/lsf/lsfqueue.go +++ b/lib/lsf/lsfqueue.go @@ -23,12 +23,12 @@ type lsfqueue struct { latest map[string]bjobsEntry } -// JobID waits for the next queue update (so even a job that was only +// Lookup waits for the next queue update (so even a job that was only // submitted a nanosecond ago will show up) and then returns the LSF -// job ID corresponding to the given container UUID. -func (q *lsfqueue) JobID(uuid string) (string, bool) { +// queue information corresponding to the given container UUID. +func (q *lsfqueue) Lookup(uuid string) (bjobsEntry, bool) { ent, ok := q.getNext()[uuid] - return ent.ID, ok + return ent, ok } // All waits for the next queue update, then returns the names of all @@ -58,7 +58,7 @@ func (q *lsfqueue) getNext() map[string]bjobsEntry { func (q *lsfqueue) init() { q.updated = sync.NewCond(&q.mutex) q.nextReady = make(chan (<-chan struct{})) - ticker := time.NewTicker(time.Second) + ticker := time.NewTicker(q.period) go func() { for range ticker.C { // Send a new "next update ready" channel to