-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc improvements #344
base: main
Are you sure you want to change the base?
Misc improvements #344
Conversation
Yay for reconnect support! 🎉 |
@macjuul We just ran into an issue of our backend losing the connection to the database, and the backend had no way to even tell us about that. Anything using queries was just stuck indefinitely. We'd be super stoked about reconnect support. But is there anything we can do in the meantime until this gets merged? Even just being able to have a timeout that would let us know the connection is lost would be a big improvement. |
We are still debating on the internal implementation of a reconnect system, however in Surrealist I implemented this manually by subscribing to disconnect events and instantiating a new connection. Until official support is available this is likely the best approach |
@macjuul Thanks for letting me know. But that would only work using rust, right? I don't see a way to subscribe to events in the TS SDK. (Hopefully I'm just blind) Edit: I just saw there is Edit 2: Yep, this seems to be that: connection.emitter.subscribe("disconnected", async () => {
// whatever
}); |
Refactored file names and imports
Enforce file name format
Initial work on reconnect support
I have read the Contributing Guidelines