Appengine Push Queue Task Status

1 view
Skip to first unread message

user1641300 via StackOverflow

unread,
Sep 10, 2014, 7:15:07 PM9/10/14
to google-appengin...@googlegroups.com

I am adding a long running task to Appengine's Push Queue. I would then like to redirect my user to a status page which upon refreshing will tell the user how many chunks of the task has been completed.

Aside from using an external datastore to keep track of the task's progress, what are my options?

(I don't see any documentation on Task or retrieving it in another view. The only thing I have found online is this SO answer from 3 years ago: Checking status of Task Queue in Google App Engine)



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/25776543/appengine-push-queue-task-status

Bardia D. via StackOverflow

unread,
Sep 10, 2014, 9:00:44 PM9/10/14
to google-appengin...@googlegroups.com

Other than datastore, you could:

  1. Keep a counter in memcache for each chunk of work and a total number of chunks counter, that way you know that 2 of 4 = 50% completed.
  2. Use Pipelines which can deliver a lot more information around the progress of asynchronous work on App Engine. https://code.google.com/p/appengine-pipeline, or the Getting Started guide is at https://code.google.com/p/appengine-pipeline/wiki/GettingStarted.
  3. Push queues aren't that great at providing status of running task completion. You could consider moving to Pull queues, and split all the units of work up into separate pull queue tasks. Pull queues have an experimental feature where you can tag the item, perhaps with the user id, and you can query the Pull queue items by a tag (https://developers.google.com/appengine/docs/python/taskqueue/overview-pull#Python_Leasing_tasks to understand how many items are leased or pending.


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/25776543/appengine-push-queue-task-status/25777383#25777383
Reply all
Reply to author
Forward
0 new messages