-
Notifications
You must be signed in to change notification settings - Fork 34
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
Remove Outer Ticker Loop - Dead Code #247
Remove Outer Ticker Loop - Dead Code #247
Conversation
Warning Rate limit exceeded@dvonthenen has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 29 minutes and 22 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent updates involve significant restructuring and enhancements of error handling for the Changes
Sequence DiagramNew Flow for
|
125ffd4
to
03c264a
Compare
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.
Actionable comments posted: 6
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- pkg/client/live/client.go (1 hunks)
- pkg/client/live/constants.go (2 hunks)
- pkg/client/speak/client_stream.go (2 hunks)
- pkg/client/speak/constants.go (2 hunks)
Additional context used
Learnings (1)
pkg/client/speak/client_stream.go (1)
User: dvonthenen PR: deepgram/deepgram-go-sdk#239 File: pkg/client/speak/client_stream.go:279-404 Timestamp: 2024-06-20T20:51:17.521Z Learning: Defer refactoring of the `listen` method in the `StreamClient` class to prioritize stability, as per dvonthenen's request.
GitHub Check: Lint
pkg/client/live/constants.go
[failure] 53-53:
invalidWebSocketMsgType
is unused (deadcode)
Additional comments not posted (3)
pkg/client/speak/constants.go (1)
51-51
: Relocation of constantdefaultDelayBetweenRetry
.The relocation of this constant is noted. Ensure that this change does not affect its usage across the project.
pkg/client/live/constants.go (1)
51-51
: Relocation of constantdefaultDelayBetweenRetry
.The relocation of this constant is noted. Ensure that this change does not affect its usage across the project.
pkg/client/speak/client_stream.go (1)
560-578
: New methodread
added.This method appears to be well-implemented for reading messages from a websocket. It correctly handles connection validation and error reporting. Ensure that this method is integrated properly in the places where message reading is required.
03c264a
to
848fe93
Compare
848fe93
to
4e87dbf
Compare
Proposed changes
Removing dead code for v
1.4.0
as suggested here:#244 (comment)
The change looks far more significant than it actually is. This deletes this section of code (https://github.com/deepgram/deepgram-go-sdk/blob/main/pkg/client/live/client.go#L301-L310) and then fixes the indentation which is why it looks like there are so many changes.
Also, removes emitting this error, for this error code, because it's actually an intended error:
https://github.com/deepgram/deepgram-go-sdk/blob/main/pkg/client/live/client.go#L346-L350
Adds a simple non-interactive example:
examples/speak/stream/simple
Tested all examples and they appear to work as intented.
Types of changes
What types of changes does your code introduce to the community Go SDK?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Summary by CodeRabbit
New Features
Refactor
listen
method for better clarity and robustness.Chores