-
Notifications
You must be signed in to change notification settings - Fork 65
Not polling updates #74
Comments
Hi @phun-ky , Unless I am mistaken, that code only calls The default polling interval is 1 second, so changes you make on your dashboard should take at ~1s to show up in your client. Let me know if that helps. |
Also, I'm curious why you decided to use polling mode here. We generally recommend streaming instead of polling since it offers many benefits like instant updates of your flag configurations in your app. Happy to answer any questions as well :) |
Reason I used polling is because the streaming method did not work. I started the file, just like the code mentioned, it registered the first feature variation and then silent. When I toggle the feature the first time, I get the log : receive patch event or something.
When I use the polling feature, I see at least the client is pulling every second, but no updates are registered even though I am toggling continuously..
|
When you get a chance, could share the code you tried with streaming? I think the reason polling didn't output updates is because |
The streaming code is the same as th polling code, only without stream : false
To clarify, when using polling, I see that the client polls for updates every second, what does that have to do with variations run once? Am I missing something?
|
I mentioned that because in your original comment you said, "I only get the console.log for SHOW/HIDE FEATURE once…". Were you seeing errors in the logs when using streaming? |
Sorry for the late reply, I've managed to do what I want with this code (this code is to fetch flags and decide server routes on my node backend:
In the first versions of this code, Which is weird because this code (that is used in an API route) works with streaming:
|
Hi @phun-ky , I'm sorry for the late response here. Are you still unable to use streaming in both of your use cases? When you try streaming mode, do you get any errors from the SDK? Also, as a side note, we've released a newer version of the SDK with a few improvements, one of which is clearer errors. |
add variation index to feature events and summary counters
With this code:
I only get the console.log for SHOW/HIDE FEATURE once, even though I see the polling log flood. I am enabling/disabling the feature flag in the dashboard, nothing happens..
The text was updated successfully, but these errors were encountered: