Hi Vince,

I haven't had a chance to integrate your code yet, so feel free to continue
making modifications. In particular, I think it would be useful to provide
the same set of options the Python deferred API accepts, which include 'eta'
and 'countdown' parameters, as well as specifying the queue and URL.

-Nick

On Wed, Nov 25, 2009 at 7:03 PM, Vince Bonfanti <vbonfa...@gmail.com> wrote:

> Hi Jeff,
>
> Thanks for the suggestions and the code. David Chandler sent me a patch to
> support user-specified queue names (almost exactly the same as your
> changes), and I've committed that patch to SVN. Regarding your other
> changes:
>
>   - I've probably make the <url-pattern> init parameter optional and have
> it default to "/_ah/<queue_name>" rather than throw an exception from the
> init method if it's missing.
>
>   - While we're at it, the default queue name could be optionally specified
> by an init parameter also.
>
>   - I'm not sure a stacktrace from the doPost method is really going to
> give you much more information, but would be open to that  change.
>
> It looks like the Deferred class is going to be added to the official GAE/J
> SDK, though I'm not sure when. Rather than make any more changes to the code
> right now, I'd rather wait to see what shows up the SDK and then work
> through normal Google channels to get any further modifications made. In the
> mean time, I'm glad it's working for you.
>
> Vince
>
> On Tue, Nov 24, 2009 at 8:09 PM, Jeff Schnitzer <j...@infohazard.org>wrote:
>
>> Attached is a modified version of that class that lets you define any
>> path you want for the servlet and lets you specify which queue to use
>> like this: Deferred.defer(task, "queueName");
>>
>> (I needed this for my own purposes)
>>
>> Do with it as you wish :-)
>>
>> The only other major change I would make is to stop masking all the
>> exceptions during the task processing.  Or at least, if you're going
>> to log the exception and stop propagation, log the whole thing so we
>> get a stacktrace in the logs.
>>
>> Jeff
>>
>> On Fri, Nov 20, 2009 at 1:03 PM, David Chandler <turboman...@gmail.com>
>> wrote:
>> > Vince, this is great! I hadn't been watching my own issue, so didn't
>> > see this until now. Thanks so much!
>> >
>> > Only enhancement I would suggest is to enable multiple deferred
>> > queues. For example. I would like to defer tasks in an email throttle
>> > queue separately from a general background queue. Perhaps the
>> > Deferrable interface could have a getQueueName() method, or
>> > Deferred.defer could have an additional signature defer(Deferrable
>> > task, String queueName).
>> >
>> > Thanks again,
>> > /dmc
>>
>> --
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to