[Zoo-discuss] zoo.update_status in a Python Zoo service
Herbert, David J.
darb1 at bas.ac.uk
Fri Oct 14 07:55:49 PDT 2016
Hello,
I am developing a Zoo WPS service in Python on an Ubuntu 14.04 Linux platform. The particular service includes the download of quite large image files, so can obviously be quite long running, especially for slow ftp sites.
I am confused by the documentation about the Zoo status service, which I am thinking allows the querying by a client of the continued progress of the long running service. I am assuming it uses the storeExecuteResponse capability of WPS to update a document at a given URL with progress information (a percentage complete figure, for example).
So I have Python code which iterates chunk-wise over the content of a large image, computes an integer percentage complete figure, and calls zoo.update_status(conf, percent_complete). I would expect this to update a web-accessible document somewhere (and another question I have is : where exactly, as a URL, is this document so I can access progress of my service?). I am confident I am passing a valid service configuration object to the call, and a valid integer between 0 and 100. When I make the call, I get the error:
/usr/lib/python2.7/threading.py:1160: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
return _active[_get_ident()]
The request then hangs and eventually times out. If I remove the update_status call, the download proceeds perfectly, according to trace in the Apache log and the returned XML document from the service itself. Surrounding the zoo.update_status call with a blanket try/except doesn't reveal any more information about what the error was unfortunately. It seems like it might be a rather low level error?
I built the status service according to:
http://www.zoo-project.org/docs/services/status.html
and did not receive any errors in the build process, and copied all necessary files to the right places as far as I know. I am also using the mod_rewrite rules for URLs according to:
http://www.zoo-project.org/docs/kernel/install-debian.html#rewrite-rule-configuration
Which appears to be working well, again as far as I can see.
Can someone enlighten me as to what the above error might be? Googling other occurrences of this particular error (only found in contexts other than Zoo) haven't sparked off any ideas on my part.
Hope someone can help! Happy to provide more info/code etc if this can help tracking it down.
Best regards,
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.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20161014/ee50a01b/attachment.html>
More information about the Zoo-discuss
mailing list