The function starts an asyncio.Task in process.
We used this when there was no celery worker, nor GC, or periodic background tasks.
There are a few flaws with this approach:
- if the process restarts or crashes, the task disappears in the limbo
- if the task fails for whatever reason it is never retried
Questions to ask
- What are the consequences if the task never completes or is somehow lost?
Possible replacements
- Celery task
- GC if for cleaning stuff
- periodic background task
example usage:
send email to support
send close account email
delete_project
- delete project node
- trigger connected service retrieve
- remove service from close project for user
- stop services from trash_project
- disconnect other sockets on user logout
- cleanup temporary guest user from temp user
- empty trash
- notify payment completion
The function starts an asyncio.Task in process.
We used this when there was no celery worker, nor GC, or periodic background tasks.
There are a few flaws with this approach:
Questions to ask
Possible replacements
example usage:
send email to supportsend close account emaildelete_project