-
Notifications
You must be signed in to change notification settings - Fork 3
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
Various Fixes: Websocket heartbeat, historical request sorting, et al #400
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit: |
brettimus
force-pushed
the
various-websocket-fixes
branch
2 times, most recently
from
December 10, 2024 15:28
a1669ed
to
f85b0f2
Compare
brettimus
commented
Dec 10, 2024
@@ -194,6 +194,19 @@ export function useRequestorHistory() { | |||
})), | |||
), | |||
); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function badly needs a refactor, but i have other things to do this week 😬
brettimus
changed the title
Various websocket fixes
Various Fixes: Websocket heartbeat, historical request sorting, et al
Dec 10, 2024
mies
approved these changes
Dec 10, 2024
flenter
approved these changes
Dec 11, 2024
brettimus
force-pushed
the
various-websocket-fixes
branch
from
December 11, 2024 12:51
aa33804
to
5c67a16
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODOs
RefactorloadHistoricalRequest
Description
This PR does a few things:
pong
responses for the heartbeat coming from the Studio frontendHeartbeat
Our
pong
responses toping
messages were never being sent down the wire, which caused theuseRealtimeService
hook to think that the websocket connection was no longer open after a minute.Changing the studio api's websocket server to treat
ping
s as regular messages resolved the issue.I kept the old code as a comment with an explainer that it was not working properly.
Load request bodies from historical requests
When poking around with the new example api, I hit a case where
loadHistoricalRequest
was not setting the body for certain requests from the history. I had to make an ugly function uglier, but resolve this issue by copy-pasting code ((working on a refactor now))Fix Default Studio Api Database Timestamps
CURRENT_TIMESTAMP
in sqlite was not iso8601. Changed the db schema default values to fix that, since sometimes we were adding iso timestamps manually to certain records, and then having a mix of timestamps messed up sorting in the UINew Example: Telegram bot
Why?
I wanted a webhook related example in our monorepo to test possible connection interruptions to webhonc.