This should be handled the same way we are waiting for pulp async tasks: https://github.com/Katello/katello/blob/master/app/lib/actions/pulp/abstract_async_task.rb