how do I poll with Rx? I want to keep querying an endpoint until its content include some value, and I want to be querying it 2 seconds apart for example until that result is found
b
bbil
12/03/2020, 9:53 PM
I haven't actually used Rx productively in a while, but I would assume something like:
Copy code
interval(2.seconds)
.flatMap {
// create observable that queries endpoint
}
.takeUntil {
// it has expected content
}
o
oday
12/03/2020, 10:35 PM
ahh interval
oday
12/03/2020, 10:35 PM
thank you
oday
12/04/2020, 10:14 AM
actually inside
takeUntil
i get back an Observer<in Transaction>
oday
12/04/2020, 10:15 AM
I cannot check whether i have the value im looking for or not until I’ve subscribed and it comes back
oday
12/04/2020, 10:16 AM
oh I can give the takeUntil the value type im expecting and check that