I'd like to add a task on the App Engine Task Queue, but only if it hasn't been enqueued before. How can I check whether its already in queue or not? Wasn't obvious from the task queue API, but maybe I missed it. They key to the task (param?) would be user_id. Use case: I keep checking for new messages every minute. This needs to happen very frequently. However, sometimes there are other jobs in this queue (they all need to be part of the same queue because they are using an external service, Gmail API, which has a rate limit of 10 qps, which I can only guarantee by rate limiting the queue). When these heavy processes run, they backlog the queue. To avoid this, I'd like to check whether a incremental-fetch task has previously been enqueued, and only enqueue if it hasn't. What is the best practice to achieve something like this?
How can I check whether I have already enqueued a task before?
147 views Asked by Debnath Sinha At
2
There are 2 answers
Related Questions in GOOGLE-APP-ENGINE
- AngularJS, Google App Engine and URLrewrite
- Optimizing for Social Leaderboards
- Getting entity with a join table GAE
- Custom exception message from google endpoints exception
- Unable to deploy an application module on AppEngine
- How to use CachedRowSet in Google App Engine?
- How can I create a docker image from the current system?
- Google datastore multiple values for the same property
- Google Cloud Storage sort directory by name
- Adding custom domain for Google App Engine WordPress site
- Arguments to Endpoints method change order
- Could someone bring Google OAuth2 for Cloud DNS via Rest to light?
- DNS_PROBE_FINISHED_NXDOMAIN on Google App Engine website
- GAE python - client_secrets.json 'File not found' - app.yaml error?
- Images not working in Google App Engine email
Related Questions in MESSAGE-QUEUE
- Message Queues: Per Message Guarantees
- mq_timedsend() returns error 14 "bad address"
- Posix message queues and the command line?
- Best way to ensure an event is eventually published to a message queuing sytem
- Azure Service Bus Queue grouped messages
- How to interrupt an xQueueReceive() API in FreeRTOS?
- Spring JMS - Unable to connect to broker URL with embedded Broker
- How to do error handling with EasyNetQ / RabbitMQ
- Setting message priority in RabbitMQ PHP
- Using a queuing system to do custom logic
- Storm-jms Spout collecting Avro messages and sending down stream?
- How many tcp connection created on a queuing protocol such as ZeroMQ
- RabbitMQ: How to send Dead Letter Exchange from Erlang client
- What happens to message in queue of 1 length which is not acked in rabbitmq?
- Can I view raw message in iron.io webpage?
Related Questions in TASK-QUEUE
- How do I pass a generator to celery.chord instead of a list?
- Optimizing Push Task Queues
- Is it possible to execute a task inside Google App Engine taskqueue?
- Check if a queue is empty in Google App Engine
- Mechanisms for creating long-running process
- Deferred Task Request deadline exceeded but work never started
- Laravel - Turn part of a function into a queued statement
- Background processes in Node.js
- app modifying the autolayout engine from a background thread
- Where to define Celery subtask queues
- laravel queue (retry jobs 5 times) & mark job as failed "manually"
- GAE TaskQueue hitting Endpoints API
- Java Google App Engine Task Queue freezes / stalls
- How can I check whether I have already enqueued a task before?
- Pausable & resumable async task queue
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I would add a tag to the task then do a lease_task_by_tag with a lease_seconds set to 0. If its empty then I can safely create a new one.