15370: Re-enable docker tests.
[arvados.git] / lib / lsf / lsfqueue.go
index 3c4fc4cb8cf6bc72e4cb1768041cd329e68eded1..60f01640a0fcab807f3f1a487558179f090de7e2 100644 (file)
@@ -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) (int, 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
@@ -94,7 +94,7 @@ func (q *lsfqueue) init() {
                        }
                        next := make(map[string]bjobsEntry, len(ents))
                        for _, ent := range ents {
-                               next[ent.name] = ent
+                               next[ent.Name] = ent
                        }
                        // Replace q.latest and notify all the
                        // goroutines that the "next update" they