add celery example

This commit is contained in:
David Lord 2023-02-09 10:50:57 -08:00
parent dca8cf013b
commit 3f195248dc
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
9 changed files with 313 additions and 0 deletions

View file

@ -14,6 +14,10 @@ Celery itself.
.. _Celery: https://celery.readthedocs.io
.. _First Steps with Celery: https://celery.readthedocs.io/en/latest/getting-started/first-steps-with-celery.html
The Flask repository contains `an example <https://github.com/pallets/flask/tree/main/examples/celery>`_
based on the information on this page, which also shows how to use JavaScript to submit
tasks and poll for progress and results.
Install
-------
@ -209,6 +213,9 @@ Now you can start the task using the first route, then poll for the result using
second route. This keeps the Flask request workers from being blocked waiting for tasks
to finish.
The Flask repository contains `an example <https://github.com/pallets/flask/tree/main/examples/celery>`_
using JavaScript to submit tasks and poll for progress and results.
Passing Data to Tasks
---------------------