How to set Task Queue order?

711 views
Skip to first unread message

Leandro Rezende

unread,
Apr 4, 2012, 1:37:00 AM4/4/12
to google-a...@googlegroups.com
im adding 10 taskes at the Queue, but i would like to a Task wait the previous task  finish before it run..

Example:

 - Added 10 tasks.
- Task 1 Run
- Task 1 Finish
- Task 2 Begin
- Task 2 Finish
- Task 3 Begin
- ......


is it possible?

Leandro


Nicholas Verne

unread,
Apr 4, 2012, 4:10:36 AM4/4/12
to google-a...@googlegroups.com
You could add task 2 from task 1, add task 3 from task 2 etc.

To prevent task2 starting before task1 finishes, set
max_concurrent_requests to 1 for the queue.

Nick Verne

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

David Hardwick

unread,
Apr 4, 2012, 9:07:20 AM4/4/12
to Google App Engine
The Pipeline would be my recommendation.

http://code.google.com/p/appengine-pipeline/

Leandro Rezende

unread,
Apr 4, 2012, 9:47:04 AM4/4/12
to google-a...@googlegroups.com
Nicholas Verne, i will try the  <max_concurrent_requests> , what about the order?

as i read in doc, it says that is FIFO, but in my tests it was running in a random order.

thx

2012/4/4 David Hardwick <david.h...@bettercloud.com>

André Salvati

unread,
Apr 4, 2012, 2:58:12 PM4/4/12
to Google App Engine
Hi Leandro,

I've asked same question os stackoverflow.

http://stackoverflow.com/questions/9982369/is-there-a-way-to-assure-fifo-first-in-first-out-behavior-with-task-queues-on

Please star it.... ;)

On Apr 4, 10:47 am, Leandro Rezende <leandro.reze...@gmail.com> wrote:
> Nicholas Verne, i will try the  <max_concurrent_requests> , what about the
> order?
>
> as i read in doc, it says that is FIFO, but in my tests it was running in a
> random order.
>
> thx
>
> 2012/4/4 David Hardwick <david.hardw...@bettercloud.com>

Leandro Rezende

unread,
Apr 5, 2012, 8:21:14 AM4/5/12
to google-a...@googlegroups.com
thx Alex,   by conicidence i had already seen our post, but as it didnt had a marked response that solved you problem too, i asked here.

i tried the "Pull" idea that someone suggested, and it works.


2012/4/4 André Salvati <andre.f...@gmail.com>
Reply all
Reply to author
Forward
0 new messages