* add federation queue state to get_federated_instances api * feature gate * move retry sleep function * move stuff around