Getting Tasks in the Google App Engine TaskQueue

I know that you can view the currently running and running tasks on the Dashboard console or on the development server. However, is there a way to get this list programmatically? The documents describe how to add tasks to the queue, but not how to list them and / or cancel them.

In python, please.

+6
python google-app-engine task task-queue dashboard
source share
3 answers

Of course, it doesn’t look like that. Instead of deleting the task, how about changing the task handler, regardless of what it handles by invoking the task url, check to see if more work needs to be done, and just return 200 OK immediately if the task is deleted.

This issue in google code appears to request the same function.

+2
source share

A workaround, as it does not seem to support this yet, would be a model of the Task data store object. Create it in the task queue, add, update it at startup, and delete it when your task starts. It can also be a good way to get around the payload limits of the api task queue.

+1
source share

If you use pull queues, this can be done using the "Job Request Queues" via:

GET https://www.googleapis.com/taskqueue/v1beta1/projects/{PROJECT_NAME}/taskqueues/{TASKQUEUE_NAME}/tasks 

Right now, this is only possible with remote queues:

"You can only use current queues in the App Engine environment, if you need to access App Engine tasks from outside the App Engine, use pull queues." - Push Queue Documents

0
source share

All Articles