Skip to content

Review usage of fire_and_forget_task using in-process asyncio.Task #9438

Description

@sanderegg

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:

  1. if the process restarts or crashes, the task disappears in the limbo
  2. if the task fails for whatever reason it is never retried

Questions to ask

  1. What are the consequences if the task never completes or is somehow lost?

Possible replacements

  1. Celery task
  2. GC if for cleaning stuff
  3. 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

Metadata

Metadata

Labels

t:maintenanceMaintenance work; used to filter tasks for end-of-sprint reporting in Review (Agreed July 3, Retro)

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions