Search code examples
javagoogle-app-enginetask-queue

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.


Solution

  • 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).