Asynchronous task queue for serverless AWS Lambda / Django / Zappa

I experimented with deploying Django apps in AWS Lambda with Zappa .

In some of my other Django projects (EC2 / EBS), if you need to do some more difficult calculations that may take some time (for example, sending a lot of emails or just processing that takes a minute), Celery . This is a task queue system in which tasks are sent to a queue, a response can be returned immediately, and employees can process tasks later.

What would be the best way to implement a celery job queuing system for a Zappa-Django application running in Lambda?

Zappa / Lambda supports scheduled tasks, and application models can be designed so that processing can be performed by scheduled functions later, and the results can be stored in the database. But I don’t think that polling for tasks once a minute is strong enough, often an immediate start of a pending task is required.

Is there an easy way to immediately return a response from a Django view and a function (from inside a Django application) with arbitrary parameters in the queue that will be executed later?

+4
source share
2 answers

SNS. lambda json.

+1

dzh- zappa. https://github.com/andytwoods/zappa-call-later. , .

X Zappa , . , ..

0

Source: https://habr.com/ru/post/1666723/


All Articles