Closed AFazakas-UAH closed 2 months ago
Hi @AFazakas-UAH,
Not sure I am following your question.
Are you asking to write code that will fallback to the second URL in the event there is an error? Or attempt to write to both URLs?
In the query example, there is code that demonstrates how to capture an error: https://github.com/influxdata/influxdb-client-dart/blob/main/example/query_example.dart#L46-L47 You could use that error if it is not empty/null to then switch between URLs.
Let us know, thanks!
Sorry it took me so long to respond. Yes, I am trying to fallback to second URl in case that the query is empty, but I have a problem, the timeout of the query It is too long, and I can't modify It
@AFazakas-UAH I think you need to implement the fallback yourself, as @powersj said. You can find an example under the link he posted.
Hi. I a developing an APP with flutter, in this case I want to check if the connection to the first IP has been made correctly, make the query correctly; otherwise try to make the connection to the second IP. Next I leave you the code that I have implemented and it works correctly with the first IP, however when I select the second IP it does not give any error, but the query is not done, because it returns the empty variables.