subscribe() does not allow customizing polling interval for iter_events
Hi 👋 and thanks for the awesome work on fal-client!
I'm using the AsyncClient.subscribe() method, and I noticed that there's currently no way to customize the polling interval for the internal call to iter_events on the AsyncRequestHandle object.
In iter_events() method, the method supports a float interval parameter (defaulting to 0.1 seconds), which is great. However, in subscribe(), this parameter is not exposed to the user, and the call to handle.iter_events() is made without allowing us to change the interval:
This is problematic for use cases where tighter or looser polling intervals are needed (e.g., less CPU usage, better responsiveness). Currently, the only workaround is to reimplement the subscription flow manually outside the client.
Suggested improvement Add an optional interval: float = 0.1 parameter to the subscribe() method signature and forward it to handle.iter_events().
Would love your thoughts on this! Happy to open a PR if helpful.
Thanks again 🙌
Wanted to create a pull request, but got a 403 when trying to upload my branch, here are the changes i was thinking about:
@BenjaminTle You'll need to fork the repo and create a branch in your fork and then create a PR from that. 403 is because you don't have write permissions for this repo, which is expected.