Michael DeHaan wrote:
Marco Mornati wrote:
Anyway... here a little mod to func-transmit to make a call for
getting result for provided job
if method=="list_minions":
[...]
elif method == "job_results":
server_spec = "*"
overlord = fc.Overlord(server_spec)
(return_code, async_results) =
overlord.job_status(params.get('parameters'))
results = {}
results[return_code] = async_results
else:
[...]
What you receive is a dictionary with
process_status: [machine: result], [machine: result]
Is not so a brilliant result... but you can read in a bit if there
are machines in error or not...
Could be useful?
Bye
Marco
This needs to be submitted using "git-format-patch/git-send-email" in
order to take it. Right now this is not in patch format.
Why would "results" not just be "async_results" but has the extra hash
key in there? I'd remove that.
Yes I've use a new dictionary, results, to make in the answer alse the
status of the job. I see that If I make a call on all my minions I
received only one process id that i need to use to check the status of
all my minion.
So in the answer all minions are divided, using a dict, in the current
job status:
{0: {hostname1: results, hostname2: results}, 1: {hostname3: results}}
if you send only the async_results... you don't have the minion job
status...
I'll send the patch in the correct git format! ;)
Also it should be "job_status" to match the overlord API call.
--Michael
Marco Mornati wrote:
Hi guys,
I'm making some improvements to Func-Java bindings and I'm having
some "async problems".
If I call in async mode func-transmit, I received, as expected, the
process ID of launched process... but, by now, I'm not able to call
func-transmit, to get the process result (func '*' --job-status PID).
Do you think could be useful to call func-transmit also for get the
result of a previous call? The only reason why I prefer to have
something in func-transmit is to get result in a "standard way"
inside the bindings api (in this case YAML)... if I call func I
receive a simple String as result.
Bye
Marco
--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmornati@xxxxxxxxxxxxx
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list