Anybody playing with task queues in AppengineJS?

4 views
Skip to first unread message

Giacecco

unread,
Jul 31, 2010, 3:50:24 PM7/31/10
to appenginejs
All, anybody has been playing with task queues? I know it's a Google
'labs' feature so perhaps I should not count too much on it, but it
would be perfect for something I am trying to do.

The first issue I bumped into is that I can't define queues beyond the
default one. I tried by setting up both queue.yaml and queue.xml ,
nothing. I can only add refer to the default queue.

The second issue is that the signature of the function to add tasks
does not really correspond to the Python examples. The following code
of mine, for example, does nothing!

taskqueue.add({ method: 'GET',
url: "/_FetchTweets",
params: { type: type, text: toMonitor[x] }
});

I snooped into AppengineJS' source code, and my code above should be
right!

Interestingly, though, the following code instead adds a task!

taskqueue.add("foo");

And from the development console shows:

task5 Sat Jul 31 19:47:36 UTC 2010 (0.371s) POST /_ah/queue/default

Sigh!

G.

George Moschovitis

unread,
Aug 1, 2010, 3:00:52 AM8/1/10
to appen...@googlegroups.com
The first issue I bumped into is that I can't define queues beyond the
default one. I tried by setting up both queue.yaml and queue.xml ,
nothing. I can only add refer to the default queue.

only tried the default queue...

something like this works for me:

    taskqueue.add({
        url: "/comment-notification",
        params: {
            author: comment.author,
            content: comment.content,
            title: article.title
        }
    });

regards,
-g.

--
http://www.gmosx.com/blog
http://www.appenginejs.org

Giacecco

unread,
Aug 1, 2010, 12:08:02 PM8/1/10
to appenginejs
Moved to the issue tracker http://github.com/gmosx/appengine/issues/issue/1

On Aug 1, 8:00 am, George Moschovitis <george.moschovi...@gmail.com>
wrote:

Giacecco

unread,
Aug 1, 2010, 1:22:36 PM8/1/10
to appenginejs
All fixed if you are curious. The problems were:

1) I had a wrong URL in the task constructor (one upper rather than
lowercase letter)
2) I put queue.xml in the root of the application rather than in WEB-
INF

On Aug 1, 5:08 pm, Giacecco <giace...@giacec.co> wrote:
> Moved to the issue trackerhttp://github.com/gmosx/appengine/issues/issue/1

George Moschovitis

unread,
Aug 1, 2010, 2:45:08 PM8/1/10
to appen...@googlegroups.com
2) I put queue.xml in the root of the application rather than in WEB-INF

supposedly you can use queue.yaml, haven't tested this though...

thanks for letting me know,
-g.




On Aug 1, 5:08 pm, Giacecco <giace...@giacec.co> wrote:
> Moved to the issue trackerhttp://github.com/gmosx/appengine/issues/issue/1
>
> On Aug 1, 8:00 am, George Moschovitis <george.moschovi...@gmail.com>
> wrote:
>
>
>
> > > The first issue I bumped into is that I can't define queues beyond the
> > > default one. I tried by setting up both queue.yaml and queue.xml ,
> > > nothing. I can only add refer to the default queue.
>
> > only tried the default queue...
>
> > something like this works for me:
>
> >     taskqueue.add({
> >         url: "/comment-notification",
> >         params: {
> >             author: comment.author,
> >             content: comment.content,
> >             title: article.title
> >         }
> >     });
>
> > regards,
> > -g.
>
> > --http://www.gmosx.com/bloghttp://www.appenginejs.org



Reply all
Reply to author
Forward
0 new messages