content app finishes servicing on_demand content requests before artifacts are fully saved
Tests in pulp_container and pulp_maven are failing because the number of artifacts is not changing after on_demand content is requested.
https://github.com/pulp/pulp_container/pull/348/checks?check_run_id=2930802562 https://github.com/pulp/pulp_maven/runs/2928096871?check_suite_focus=true https://github.com/pulp/pulp_rpm/pull/2018/checks?check_run_id=2852155111#step:11:950
Added by email@example.com over 2 years ago
Shields coroutine that is saving Artifact and Content
After the client receives the last chunk of the response, it closes the connection with the content app. This causes all scheduled coroutines to be cancelled. If the the thread that is performing the Artifact/Content save has not finished running, the Content is never saved.
This patch ensures that the Artifact and the Content are fully saved to the database after being streamed to the user.