Skip to content

Instantly share code, notes, and snippets.

@virendersran01
Forked from Aldikitta/DataSource.kt
Created June 18, 2023 13:20
Show Gist options
  • Save virendersran01/10a70edf6215fa7999f369665970712a to your computer and use it in GitHub Desktop.
Save virendersran01/10a70edf6215fa7999f369665970712a 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