Hi,
I'm struggling with talking to WordPress from my gae app.
I've got code that works some of the time, but sometime throws
Application Error: 5, which I believe means it is being timed out by
GAE. Application Error: 5 is thrown if the communication with
WordPress takes longer than 5 seconds.
Here's the code (which runs in the default instance, not a backend):
from pyblog import WordPress
...
try:
logging.debug("About to post to wp")
wp = WordPress(lserverapi, lusername, lpassword)
lwppost = {}
lwppost['description'] = lpostcontent
lwppost['title'] = lpostcontent[:140]
result = wp.new_post(lwppost)
lpostresult = "Posted to wp, result: %s" % ( str(result) )
logging.info(lpostresult)
except Exception, ex:
logging.error(ex)
lpostresult = '** Exception: %s **' % (str(ex))
pyblog is here: http://code.google.com/p/python-blogger/
pyblog uses xmlrpclib (it's a fairly trivial wrapper over xmlrpclib).
It's driving me to distraction, because the wp.new_post() call times
out, but also succeeds (ie: the post is created). But for what I'm
doing, I *must* get the id back from the new_post() call so I can
store it away for later (and so recognise later that I actually
created the post).
Is there a way to lengthen the timeout past 5 seconds for xmlrpclib?
Or
Will using a backend make the timeout longer / let me set a longer timeout?
Or
Is there something different/better I should be doing to talk to WordPress?
--
Emlyn
http://my.syyn.cc - Synchonise Facebook, WordPress and Google Buzz posts,
comments and all.
http://www.blahblahbleh.com - A simple youtube radio that I built
http://point7.wordpress.com - My blog
Find me on Facebook and Buzz
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.