Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine (Java) TaskQueue API: how to query number of running/pending tasks?

Is it possible to programmatically query the Task Queue API to see how many tasks are currently executing/pending?

I don't see any way to do this in the API, and so I resorted to creating objects in the Datastore to represent queued tasks. When run, the tasks then remove their corresponding entry from the Datastore.

As you can imagine, it's easy for this to get out of sync. I'd actually be pretty happy just to be able to get a simple count of tasks in the queue for a given queue name.

like image 785
George Armhold Avatar asked Jan 22 '11 19:01

George Armhold


2 Answers

Unfortunately, there is no API you can use to get information about the task queues. However, this is something I believe the team has in mind for the future (a programmatic interface to get stats that we currently see on the dashboard, like task count).

like image 179
David Underhill Avatar answered Oct 14 '22 00:10

David Underhill


As announced in April, Task Queue Statistics are currently available to Trusted Testers. Task Queue Statistics allows you to fetch statistics and information about your task queue from within your application. http://googleappengine.blogspot.com.au/2012_04_01_archive.html

like image 1
Eric Willigers Avatar answered Oct 14 '22 01:10

Eric Willigers