[CE] use `retry_on_exception` instead of duplicating code
What does this MR do?
Uses retry_on_exception
instead of duplicating code.
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14051
Does this MR meet the acceptance criteria?
Conformity
Edited by Mark Lapierre