I think the 10 second deadline is only for 'online' (aka user)
requests, in tasks it is 10 *minutes* isn't it?

http://code.google.com/appengine/docs/python/urlfetch/overview.html#Requests



Robert





On Wed, May 25, 2011 at 00:41, Emlyn <[email protected]> wrote:
> Gah, really, is that the only way? I'd really, really like to not have to
> have a proxy sitting somewhere else doing the heavy lifting (well, the heavy
> waiting really).
>
> On 25 May 2011 14:02, Brandon Wirtz <[email protected]> wrote:
>>
>> URL Fetch is good for 10 seconds.  WP often is not that fast.  Likely you
>> will need to write a PHP Proxy that excepts Post requests and use it to
>> forward to the XMLRPC receiver on Wordpress, that way you can send the data
>> and have PHP do the waiting.  (that’s assuming you are adding not querying).
>>
>>
>>
>>
>>
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Emlyn
>> Sent: Tuesday, May 24, 2011 9:29 PM
>> To: [email protected]
>> Subject: Re: [google-appengine] Application Error: 5 when calling
>> WordPress via xmlrpclib
>>
>>
>>
>> It's already in a task. Also, I'm not directly using urlfetch; I'm using
>> pyblog.py which uses xmlrpclib which I guess ultimately uses urlfetch, so I
>> can't set the deadline directly (although there do seem to be timeout
>> mechanisms, they just don't work past 5 seconds as GAE cuts the call off).
>>
>>
>>
>> One thing I'm hoping someone can answer is, will using the new "backend"
>> functionality result in getting a longer time limit here? Does anyone know?
>>
>>
>>
>>
>>
>> On 25 May 2011 13:44, Robert Kluin <[email protected]> wrote:
>>
>> Hi Emlyn,
>>  You could move the request to a task, then increase the deadline.
>> That would probably be the easiest solution.
>>
>>  http://code.google.com/appengine/docs/python/urlfetch/fetchfunction.html
>>
>>
>> Robert
>>
>>
>>
>>
>>
>> On Tue, May 17, 2011 at 09:13, Emlyn <[email protected]> wrote:
>> > 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.
>> >
>> >
>>
>> --
>> 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.
>>
>>
>> --
>> 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.
>>
>> --
>> 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.
>
>
>
> --
> 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.
>

-- 
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.

Reply via email to