I just committed the following changes: - Added additional overloads to the defer() method to allow optional TaskOptions to be specified. This lets you set the following task options: url, countdownMIllis, etaMillis, taskName.
- Added support for optional "queueName" and "taskUrl" init parameters. - The defer() method and its overloads no longer throw IOException; instead, an unchecked QueueFailureException is thrown if there's a failure to serialize the task object (Deferrable instance). - The defer() method and its overloads now return a TaskHandle. - A stacktrace is now logged upon failure to deserialize the task. - Updated javadoc comments. For convenience, here's the direct link to the source: http://code.google.com/p/gaevfs/source/browse/trunk/src/com/newatlanta/appengine/taskqueue/Deferred.java As always, looking forward to comments and feedback. Vince On Thu, Nov 26, 2009 at 5:39 AM, Nick Johnson (Google) < [email protected]> wrote: > 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 <[email protected]>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 <[email protected]>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 >>> >>> -- 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 [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-java?hl=en.
