Land #5488, fix job stopping from RPC service

bug/bundler_fix
Brent Cook 2015-06-05 12:29:26 -05:00
commit a3b61dc362
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
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: # @example Here's how you would use this from the client:
# rpc.call('job.stop', 0) # rpc.call('job.stop', 0)
def rpc_stop(jid) 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 error(500, "Invalid Job") if not obj
obj.stop self.framework.jobs.stop_job(jid)
{ "result" => "success" } { "result" => "success" }
end end