docs/discussion/background_tasks.rst
raw| 1 | .. _background_task_discussion: |
| 2 | |
| 3 | Background tasks |
| 4 | ================ |
| 5 | |
| 6 | The API for background tasks follows Sanic and Starlette by taking a |
| 7 | callable and arguments. However, Quart will ensure that the tasks |
| 8 | finish during the shutdown (unless the server times out and |
| 9 | cancels). This is as you'd hope in a production environment. |
| 10 | |
| 11 | Errors raised in a background task are logged but otherwise ignored |
| 12 | allowing the app to continue - much like with request/websocket |
| 13 | handling errors. |