Fix storage migration check for non-empty queues
What does this MR do?
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25976 we've implemented a check to prevent running the rake task while an opposite operation is still running/scheduled. The problem is that the API used works only in test mode.
This fixes the tests and switch to a code that can run in production.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/58739
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides
Closes #58739 (closed)