task-queue

Specifying retry limit for tasks queued using GAE deferred library

你离开我真会死。 提交于 2020-01-10 06:04:25
问题 We are offloading certain time consuming tasks using the GAE deferred library and would like to know how can we set the retry limit for those offloaded tasks. We are running into issues where certain tasks are retried for ever as the task would never succeed due to some un recoverable exception. 回答1: According to the documentation the _retry_options of the deferred.defer API can be used to pass retry options to the associated Task() instance: _countdown, _eta, _headers, _name, _target,

What's the correct approach for a Twitter Application on Google App Engine?

狂风中的少年 提交于 2020-01-02 06:35:07
问题 I am trying to develop a Twitter App on Google App Engine. The app basically collects all tweets from a Twitter user's and his/her followers and their followers and so on. It typically collects 500 tweets per run per user and then inserts the data for the user into the database. The tweet collection process has to be done every hour. Currently, I am using cron jobs for doing this. But it gives a lot of Deadline exceeded errors, even for one user, which is not a good sign. I am using Python.

Checking status of Task Queue in Google App Engine

試著忘記壹切 提交于 2020-01-01 04:46:04
问题 I'm putting several tasks into a task queue and would like to know when the specific tasks are done. I haven't found anything in the API about call backs, or checking the status of a task, so I thought I'd see what other people do, or if there's a work around (or official) way to check. I don't care about individual tasks, if it helps, I'm putting 6 different tasks in, and want to know when all 6 are complete. Thanks! 回答1: The new REST/JSON task queue API will let you do this. http://code

Why is this microtask executed before macrotask in event loop?

爱⌒轻易说出口 提交于 2019-12-30 11:51:32
问题 My understanding is that the full microtask task queue is processed after each macrotask. If that is the case, why does the setTimeout callback get executed after the Promise microtasks in the following snippet of JavaScript ? console.log('start'); setTimeout(() => { console.log("setTimeout"); }); Promise.resolve().then(function() { console.log('promise'); }); console.log('end'); This outputs the following: > "start" > "end" > "promise" > "setTimeout" Is it because of a ~ 4ms delay imposed by

asynchronous processing with PHP - one worker per job

孤街醉人 提交于 2019-12-29 03:34:52
问题 Consider a PHP web application whose purpose is to accept user requests to start generic asynchronous jobs, and then create a worker process/thread to run the job. The jobs are not particularly CPU or memory intensive, but are expected to block on I/O calls fairly often. No more than one or two jobs should be started per second, but due to the long run times there may be many jobs running at once. Therefore, it's of utmost importance that the jobs run in parallel. Also, each job must be

Configure app engine push task queue for twilio SMS verification

寵の児 提交于 2019-12-25 03:44:19
问题 This question is a follow up to How to implement an atomic integer in Java App Engine?. Basically I am create a push Task Queue to implement SMS verification. I am using Twilio to send the SMS. Each SMS is a five digit pin number. The following is my queue.xml file for app-engine. <queue-entries> <queue> <name>sms-verification</name> <rate>200/s</rate> <bucket-size>100</bucket-size> <max-concurrent-requests>10</max-concurrent-requests> </queue> </queue-entries> I want the best rate I can get

What's the best way to get data back from a Task in GAE to form a loop of Task Queues?

╄→гoц情女王★ 提交于 2019-12-24 17:58:52
问题 I have a long-running process in a task queue that is causing a DeadlineExceededError because the task can take longer than 10 minutes. As I described in this question, the long-running process has a for loop that sequentially calculates new values in large dictionaries that are used to create kml files. The task currently looks like this: class longprocess_handler(webapp2.RequestHandler): def post(self): #This is currently one task that recursively uses data in dictionaries to #produce kml

KeyError during python GAE push task queue with cron

蓝咒 提交于 2019-12-24 03:43:31
问题 I'm very close to finishing up a project that uses push task queues in GAE to send out follow-up emails to users. However, I keep getting a KeyError and don't know why. I been looking for good models to base my project on but haven't found any decent examples that use multiple parameters. The GAE documentation has improved in the last month but still leaves a lot to be desired. I've checked many pieces of the code using the interactive console in the development server but still I don't know

Google app engine task queue and users service

筅森魡賤 提交于 2019-12-24 01:53:50
问题 I am using python and Google app engine. I would like to use the task queue. As part of the task queue handler I check if the current user is an admin (using the Users service). This test always fails. Is there a way to cause this test to pass? update: To avoid further confusion, I am trying to find if the user that triggered the task was an admin or not (this is just a simple example). I understand that the task is being run from the server and all the users cookies are long gone. So the

How to queue several functions set by setTimeout with JS/jQuery

蓝咒 提交于 2019-12-24 00:55:13
问题 I have a workflow on JS, which should run several set by setTimeout functions one by one. How this could be done with JS/jQuery, preferably in some easy and beautiful way? It looks like this function recursiveOne(arg1){ if (allRight) return; doSomething(); andAnotherOne(); setTimeout(function(){recursiveOne(arg1)}, 3000); } function coreFunction(){ recursiveOne(arg1); recursiveTwo(arg2); recursiveThree(arg3); } where recursiveTwo should start only when recursiveOne already done its last