diff --git a/doc/source/launchers.rst b/doc/source/launchers.rst
index a219936..27c8c01 100644
--- a/doc/source/launchers.rst
+++ b/doc/source/launchers.rst
@@ -170,17 +170,20 @@
 immediately send a WORK_DATA packet with the following information
 encoded in JSON format:
 
-**full_url**
-  The URL with the status or results of the build.  Will be used in
-  the status page and the final report.
+**name**
+  The name of the job.
 
 **number**
   The build number (unique to this job).
 
-**master**
+**manager**
   A unique identifier associated with the Gearman worker that can
   abort this build.  See `Stopping Builds`_ for more information.
 
+**url** (optional)
+  The URL with the status or results of the build.  Will be used in
+  the status page and the final report.
+
 It should then immediately send a WORK_STATUS packet with a value of 0
 percent complete.  It may then optionally send subsequent WORK_STATUS
 packets with updated completion values.
@@ -202,13 +205,19 @@
 If Zuul needs to abort a build already in progress, it will invoke the
 following function through Gearman:
 
-  stop:MASTER_NAME
+  stop:MANAGER_NAME
 
-Where **MASTER_NAME** is the name of the master node supplied in the
-initial WORK_DATA packet when the job started.  This is used to direct
-the stop: function invocation to the correct Gearman worker that is
-capable of stopping that particular job.  The argument to the function
-will be the unique ID of the job that should be stopped.
+Where **MANAGER_NAME** is the name of the manager worker supplied in
+the initial WORK_DATA packet when the job started.  This is used to
+direct the stop: function invocation to the correct Gearman worker
+that is capable of stopping that particular job.  The argument to the
+function should be the following encoded in JSON format:
+
+**name**
+  The job name of the build to stop.
+
+**number**
+  The build number of the build to stop.
 
 The original job is expected to complete with a WORK_DATA and
 WORK_FAIL packet as described in `Starting Builds`_.
@@ -220,14 +229,16 @@
 current state of all related builds, the job runner may optionally
 implement the following Gearman function:
 
-  set_description:MASTER_NAME
+  set_description:MANAGER_NAME
 
-Where **MASTER_NAME** is used as described in `Stopping Builds`_.  The
-argument to the function is the following encoded in JSON format:
+Where **MANAGER_NAME** is used as described in `Stopping Builds`_.
+The argument to the function is the following encoded in JSON format:
 
-**unique_id**
-  The unique identifier of the build whose description should be
-  updated.
+**name**
+  The job name of the build to describe.
+
+**number**
+  The build number of the build to describe.
 
 **html_description**
   The description of the build in HTML format.
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 6babdc0..9a4819a 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -515,9 +515,10 @@
 
     def run(self):
         data = {
-            'full_url': 'https://server/job/%s/%s/' % (self.name, self.number),
+            'url': 'https://server/job/%s/%s/' % (self.name, self.number),
+            'name': self.name,
             'number': self.number,
-            'master': self.worker.worker_id,
+            'manager': self.worker.worker_id,
             }
 
         self.job.sendWorkData(json.dumps(data))
@@ -594,9 +595,11 @@
 
     def handleStop(self, job, name):
         self.log.debug("handle stop")
-        unique = job.arguments
+        parameters = json.loads(job.arguments)
+        name = parameters['name']
+        number = parameters['number']
         for build in self.running_builds:
-            if build.unique == unique:
+            if build.name == name and build.number == number:
                 build.aborted = True
                 build.release()
                 job.sendWorkComplete()
@@ -606,15 +609,16 @@
     def handleSetDescription(self, job, name):
         self.log.debug("handle set description")
         parameters = json.loads(job.arguments)
-        unique = parameters['unique_id']
+        name = parameters['name']
+        number = parameters['number']
         descr = parameters['html_description']
         for build in self.running_builds:
-            if build.unique == unique:
+            if build.name == name and build.number == number:
                 build.description = descr
                 job.sendWorkComplete()
                 return
         for build in self.build_history:
-            if build.uuid == unique:
+            if build.name == name and build.number == number:
                 build.description = descr
                 job.sendWorkComplete()
                 return
diff --git a/zuul/launcher/gearman.py b/zuul/launcher/gearman.py
index 5471efb..35dc081 100644
--- a/zuul/launcher/gearman.py
+++ b/zuul/launcher/gearman.py
@@ -308,9 +308,9 @@
             self.log.debug("Found build %s" % build)
             if not build.number:
                 self.log.info("Build %s started" % job)
-                build.url = data.get('full_url')
+                build.url = data.get('url')
                 build.number = data.get('number')
-                build.__gearman_master = data.get('master')
+                build.__gearman_manager = data.get('manager')
                 self.sched.onBuildStarted(build)
             build.fraction_complete = job.fraction_complete
         else:
@@ -341,9 +341,10 @@
 
     def cancelRunningBuild(self, build):
         stop_uuid = str(uuid4().hex)
-        stop_job = gear.Job("stop:%s" % build.__gearman_master,
-                            build.uuid,
-                            unique=stop_uuid)
+        data = dict(name=build.job.name,
+                    number=build.number)
+        stop_job = gear.Job("stop:%s" % build.__gearman_manager,
+                            json.dumps(data), unique=stop_uuid)
         self.meta_jobs[stop_uuid] = stop_job
         self.log.debug("Submitting stop job: %s", stop_job)
         self.gearman.submitJob(stop_job)
@@ -351,7 +352,7 @@
 
     def setBuildDescription(self, build, desc):
         try:
-            name = "set_description:%s" % build.__gearman_master
+            name = "set_description:%s" % build.__gearman_manager
         except AttributeError:
             # We haven't yet received the first data packet that tells
             # us where the job is running.
@@ -361,7 +362,8 @@
             return False
 
         desc_uuid = str(uuid4().hex)
-        data = dict(unique_id=build.uuid,
+        data = dict(name=build.job.name,
+                    number=build.number,
                     html_description=desc)
         desc_job = gear.Job(name, json.dumps(data), unique=desc_uuid)
         self.meta_jobs[desc_uuid] = desc_job
