private suspend fun <T> executeUntilWorking(imsProject: IMSProject, users: List<IMSUser>, executor: suspend (token: ResponseType) -> Optional<T>, owner: List<GropiusUser>): Pair<IMSUser, T>

Attempt a query for a list of users until it works

Return

The user it worked with and the result of the executor

Parameters

imsProject

The IMS to work with

users

The list of users, sorted with best first

executor

The function to execute

owner

The user that created the data, empty if fetching/other non-owned operations


suspend fun <T> executeUntilWorking(imsProject: IMSProject, user: List<User>, owner: List<GropiusUser>, executor: suspend (token: ResponseType) -> Optional<T>): Pair<IMSUser, T>

Attempt a query for a list of users until it works

Return

The user it worked with and the result of the executor

Parameters

imsProject

The IMS to work with

user

The list of users, sorted with best first

executor

The function to execute

owner

The user that created the data, empty if fetching/other non-owned operations