Skip to content

Instantly share code, notes, and snippets.

@Aldikitta
Created June 14, 2023 09:34
Show Gist options
  • Save Aldikitta/bb2ee5617d21023eec11f8d8f2ae2d58 to your computer and use it in GitHub Desktop.
Save Aldikitta/bb2ee5617d21023eec11f8d8f2ae2d58 to your computer and use it in GitHub Desktop.
fun getDetailAgentVisitFullResponseFlow(
token: String,
id: Int
): Flow<BaseResponse<GetAgentDetailResponse>> {
return flow {
while (true) {
val getDetailAgent = agentVisitService.getDetailAgentVisitWithFullResponse(
token = token,
id = id
)
emit(getDetailAgent)
delay(5000L)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment