Hi Greg,

I'm having trouble figuring out the exact syntax for deferring tasks
to a backend.

When I try to use the following syntax:
deferred.defer(PullReport,userkey,dates,_queue="googleanalytics",_target='processga')
I get the following error:
TypeError: PullReport() got an unexpected keyword argument '_target'

Also, how exactly do we specify to start a pipeline in a specific
backend.  I've tried pipeline.start(_target='backend-name') but get an
unexpected keyword argument as well.

Thanks!
Aaron

On May 14, 7:19 pm, "Greg Darke (Google)" <[email protected]>
wrote:
> Since backends and frontends are updated separately, the code in each
> may be different. Updating a frontend does not change the code that is
> running in a backend/vice versa.
>
> As for the syntax, I believe it should be:
> deferred.defer(deferred_fn_name, param1, param2, _target='backend-name')
>
> On 14 May 2011 18:22, Aaron <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi Greg,
>
> > Thanks for the response.  Just to be clear, the syntax to defer a task
> > to a backend is the following?
> > deferred.defer(deferred_fn_name, param1, param2, _target='http://
> > backend-name.app-id.appspot.com')
>
> > Also, you mentioned that we should be sure that the backend has the
> > same classes and configurations as the frontend?  As far as I have
> > read, the frontend and backend are using the same code base, so is
> > this implied already, or is there something extra I am missing?
>
> > Best,
> > Aaron
>
> > On May 14, 5:56 pm, "Greg Darke (Google)" <[email protected]>
> > wrote:
> >> You should be able to send a deferred task to a backend.
>
> >> Some points to remember though:
> >>  * You should ensure that any classes/etc you reference from the
> >> frontend must exist in the backend.
> >>  * The deferred function should pass the 'target' parameter on to taskqueue
> >>  * You must enable the deferred handler on the backend (just make sure
> >> it is enabled in app.yaml when you upload the backend).
>
> >> On 14 May 2011 14:41, Aaron <[email protected]> wrote:
>
> >> > Hi,
>
> >> > The way my application is set up involves deferring a lot of long-
> >> > running tasks, which I now would like to move to a backend.  Is it
> >> > possible to defer a task so that it is processed in a backend?  Or, do
> >> > I have to create handlers for every deferred task in order to take
> >> > advantage of this feature?
>
> >> > Best,
> >> > Aaron
>
> >> > P.S. Thanks so much for the hard work!  The new features are very
> >> > exciting :).
>
> >> > --
> >> > 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 
> >> > athttp://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 
> > athttp://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