Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting the Tasks in a Google App Engine TaskQueue

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

In python please.

like image 995
speedplane Avatar asked Oct 23 '10 04:10

speedplane


People also ask

How does Google App Engine Work?

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.

What is Google task queue?

Task queue functions take advantage of Google Cloud Tasks to help your app run time-consuming, resource-intensive, or bandwidth-limited tasks asynchronously, outside your main application flow.

What is the difference between a message queue and a task queue?

A Message Queue is a mechanism for sharing information, between processes, threads, systems. An AppEngine task Queue is a way for an AppEngine application to say to itself, I need to do this, but I am going to do it later, outside of the context of a client request.


2 Answers

It sure doesn't look that way. Instead of removing the task, how about altering the task handler, whatever it is that handles the task url invokes, to check to see if the work specified still needs to be done, and just return 200 OK immediately if the task would be deleted.

This issue on google-code appears to request the very same feature.

like image 154
SingleNegationElimination Avatar answered Oct 23 '22 12:10

SingleNegationElimination


A workaround, since they don't seem to support this yet, would be to model a Task datastore object. Create one on task queue add, update it when running, and delete it when your task fires. This can also be a nice way to get around the payload limits of the task queue api.

like image 43
jhorman Avatar answered Oct 23 '22 13:10

jhorman