generate job info from available properties in rpc. fixes #2236
git-svn-id: file:///home/svn/framework3/trunk@9902 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
50914a1e68
commit
b8b5d0586d
|
@ -28,7 +28,19 @@ class Job < Base
|
|||
if(not obj)
|
||||
raise ::XMLRPC::FaultException.new(404, "no such job")
|
||||
else
|
||||
info = obj.info
|
||||
info = {
|
||||
"jid" => obj.jid,
|
||||
"name" => obj.name,
|
||||
"start_time" => obj.start_time
|
||||
}
|
||||
if obj.ctx && obj.ctx[0]
|
||||
if obj.ctx[0].respond_to?(:get_resource)
|
||||
info['uripath'] = obj.ctx[0].get_resource
|
||||
end
|
||||
if obj.ctx[0].respond_to?(:datastore)
|
||||
info['datastore'] = obj.ctx[0].datastore
|
||||
end
|
||||
end
|
||||
{ "result" => "success" , "info" => info}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -83,7 +83,6 @@ class Job
|
|||
|
||||
protected
|
||||
|
||||
attr_writer :info #:nodoc:
|
||||
attr_writer :name #:nodoc:
|
||||
attr_writer :jid #:nodoc:
|
||||
attr_accessor :job_thread #:nodoc:
|
||||
|
|
Loading…
Reference in New Issue