Backport 9542 to pulpcore 3.15
We would like to request that 9542 be backported to pulpcore 3.15 so that it can be included in automation hub 4.4.
Added by bmbouter about 2 years ago
backports Artifact redownloading bug
sync_to_async_iterable wraps the Artifact queryset, but unlike
querysets, it can't be reused. This causes subsequent iterations
through it to not actually iterate.
(cherry picked from commit a9431560785c5b16c27708928a3dd10763401899)