Fix #5461, actually stop a job from the RPC service

Fix #5461. The RPC service is incorrectly using the wrong method to
stop a job, this patch should fix that.
bug/bundler_fix
wchen-r7 2015-06-04 23:09:55 -05:00
parent 26785b34f1
commit 910ae8a480
1 changed files with 3 additions and 2 deletions

View File

@ -28,9 +28,10 @@ class RPC_Job < RPC_Base
# @example Here's how you would use this from the client:
# rpc.call('job.stop', 0)
def rpc_stop(jid)
obj = self.framework.jobs[jid.to_s]
jid = jid.to_s
obj = self.framework.jobs[jid]
error(500, "Invalid Job") if not obj
obj.stop
self.framework.jobs.stop_job(jid)
{ "result" => "success" }
end