[Zoo-discuss] zoo.update_status in a Python Zoo service (part 2)
Fenoy Gerald
gerald.fenoy at geolabs.fr
Tue Oct 18 02:29:43 PDT 2016
Hello David,
sorry for the previous email, I did not notice this one still..
Nevertheless, I have answered partially your question about how to request the service to run asyncrhonously. Once you have call the Execute request, then your client will receive an ExecuteReponse document getting a statusLocation attribute that can be used to poll the current status of the service execution.
The last request given here [1] and the comment just on top of it should help you to interact with asynchronous service execution.
Side note, the conf[« lenv »][« message »] should be defined before running the service (cf. [1]) so it should not hurt if you do not specify any message as it should already exists.
I hope to hear back from you,
Best regards,
[1] http://zoo-project.org/workshops/2014/first_service.html#the-hello-service
[1] http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/zoo_service_loader.c#L1911
> Le 14 oct. 2016 à 18:10, Herbert, David J. <darb1 at bas.ac.uk> a écrit :
>
> Hello all,
>
> I think I solved at least part of my own problem. Looking in more detail at the example Python services, I discovered I was not setting conf["lenv"]["message"] to what I wanted to be output in the status document - I think I'd assumed zoo.update_status did that from its arguments. So I have got past the Python error which was presumably update_status choking on an uninitialised dictionary key!
>
> Still puzzling over how I actually use the status service to query the progress of my service. Problem is that the client side of this project may not eventually be using the Zoo Javascript API, so we really need to know how to make calls manually. Can anyone point me to where this is documented?
>
> Many thanks,
>
> David Herbert
> British Antarctic Survey.
> This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/zoo-discuss
Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay
More information about the Zoo-discuss
mailing list