-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It's truly not recommendable calling external webservice from within a worker thread. If all of the (four) worker threads of Zope run into a timeout then you are doomed. Your complete system will be blocked and modifying the socket time out is also a bad thing (at least in pre Python 2.6 versions where the socket time is a global resource).
- -aj mcelotti wrote: > Hi, I use YouTube Data API ( > http://code.google.com/apis/youtube/1.0/developers_guide_python.html > http://code.google.com/apis/youtube/1.0/developers_guide_python.html > ) to fetch videos and other youtube informations. Sometimes (not that > often, but it happened) the python call "freezes" while waiting for > youtube data, and this is a problem because it "freezes" my page. I > tried a timeout decorator ( > http://pypi.python.org/pypi/timeout/0.1.2 > http://pypi.python.org/pypi/timeout/0.1.2 ) but I get this error: > "ValueError: signal only works in main thread". A timeout could be > useful to handle also other python libs (twitter, flickr etc) and > avoid these blank pages when the external service does not respond. > Has somebody faced this problem? Is there a solution? I'm using > python2.4 and Plone 3. > > Thank you all, Marco C. > > -- View this message in context: > http://plone.293351.n2.nabble.com/Timeout-decorator-on-external-service-call-tp7063682p7063682.html > > Sent from the Product Developers mailing list archive at Nabble.com. > _______________________________________________ Product-Developers > mailing list [email protected] > https://lists.plone.org/mailman/listinfo/plone-product-developers - -- ZOPYX Limited | zopyx group Charlottenstr. 37/1 | The full-service network for Zope & Plone D-72070 Tübingen | Produce & Publish www.zopyx.com | www.produce-and-publish.com - ------------------------------------------------------------------------ E-Publishing, Python, Zope & Plone development, Consulting -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJO3RRZAAoJEADcfz7u4AZjIFYLwKybSax2TUGrqjGWn4wKDSeU gJlygrsv6vJ3SGjJFz6HIH/c0aoUSjDxecrMLGNxSLTsSC3A6UDYEbmG4UNXYxoC ev/w1kuvpp7yCAWiuoM0JqtW9JEdGtZULF97E35eiYlYjJIwstpQZiZmNo9M5aAb 6OMgDO242CFnzpBJOI/SOQrSG5K/H0w511IqRCaDa5oB/pp8JwIxzhhNjKZkHF9g 4XDVojVGfuxHTCOC6fSgaZ+1N+QC8RF2RarVm+Ot8P1YSWeFyL7bKEbDrTvraLS+ ZWqzalJXvZJ9QdeQqt+FYf06JMiu3lFPE/fkCprRochPRTVTBTBK76CjJpJd04Ah ij9EGFqqc8RetHRbQyfKcHYjWL1XQIEgAZMx/R+182wTe5WaH2ihcspnDHCOjmQW gWeLepyo6pT4pEwhJhg3BUNCnEuddsRKypGIOBXvjOauO20dd85pNyAjeLkjv1tk YtqQgICr5EY1cCYU7FUk8zPq1thTdoc= =Y10+ -----END PGP SIGNATURE-----
<<attachment: lists.vcf>>
_______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/plone-product-developers
