Merge "Re-enable test_client_get_running_jobs" into feature/zuulv3
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index ae80330..bd52886 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -3745,7 +3745,6 @@
         self.launch_server.release()
         self.waitUntilSettled()
 
-    @skip("Disabled for early v3 development")
     def test_client_get_running_jobs(self):
         "Test that the RPC client can get a list of running jobs"
         self.launch_server.hold_jobs_in_build = True
@@ -3763,7 +3762,7 @@
             if time.time() - start > 10:
                 raise Exception("Timeout waiting for gearman server to report "
                                 + "back to the client")
-            build = self.launcher.builds.values()[0]
+            build = self.launch_client.builds.values()[0]
             if build.worker.name == "My Worker":
                 break
             else:
diff --git a/zuul/launcher/server.py b/zuul/launcher/server.py
index b831107..74cc2be 100644
--- a/zuul/launcher/server.py
+++ b/zuul/launcher/server.py
@@ -362,7 +362,8 @@
 
             data = {
                 'manager': self.hostname,
-                'url': 'https://server/job',
+                'url': 'https://server/job/{}/0/'.format(args['job']),
+                'worker_name': 'My Worker',
             }
 
             # TODOv3:
diff --git a/zuul/rpclistener.py b/zuul/rpclistener.py
index 90e17dc..c780df4 100644
--- a/zuul/rpclistener.py
+++ b/zuul/rpclistener.py
@@ -161,10 +161,11 @@
         # args = json.loads(job.arguments)
         # TODO: use args to filter by pipeline etc
         running_items = []
-        for pipeline_name, pipeline in six.iteritems(
-                self.sched.layout.pipelines):
-            for queue in pipeline.queues:
-                for item in queue.queue:
-                    running_items.append(item.formatJSON())
+        for tenant in self.sched.abide.tenants.values():
+            for pipeline_name, pipeline in six.iteritems(
+                    tenant.layout.pipelines):
+                for queue in pipeline.queues:
+                    for item in queue.queue:
+                        running_items.append(item.formatJSON())
 
         job.sendWorkComplete(json.dumps(running_items))