Sobes.tech
Junior — Middle+

Implementation of a polling mechanism with termination conditions

livecode

Task condition

It is necessary to develop the logic for repeated requests (polling), including stop conditions and returning the obtained result.

class RepeatedRequestUseCase(
    private val fetchSomethingUseCase: GetSomethingUseCase
) {
    suspend fun invoke(id: String): Result {
        // TODO impl
    }
}