Created
June 14, 2023 09:34
-
-
Save Aldikitta/bb2ee5617d21023eec11f8d8f2ae2d58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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