build-system
build-system copied to clipboard
Move errata record creation in dramatiq task
Currently we create new errata record while being inside FastAPI endpoint. This has several drawbacks:
- the process is quite long and takes one of the Gunicorn workers;
- it operates in the same async loop as the FastAPI app basically affecting application ability to serve requests;
- it makes a lot of external requests to repositories metadata which is not very good behavior to have inside the endpoint.
Because of all of that we need to move errata creation into separate Dramatiq task.