Skip to content
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

websocket killpill #4550

Merged
merged 1 commit into from
Oct 18, 2024
Merged

websocket killpill #4550

merged 1 commit into from
Oct 18, 2024

Conversation

HugoCasa
Copy link
Contributor

@HugoCasa HugoCasa commented Oct 18, 2024

Important

Adds a 'killpill' mechanism to terminate websocket listeners in websocket_triggers.rs.

  • Behavior:
    • Introduces killpill_rx to stop websocket listeners in start_websockets, listen_to_unlistened_websockets, maybe_listen_to_websocket, and listen_to_websocket.
    • Uses tokio::select! to listen for killpill_rx signal and terminate loops in start_websockets and listen_to_websocket.
  • Functions:
    • Refactors start_websockets to use listen_to_unlistened_websockets for initial websocket setup.
    • Adds killpill_rx parameter to maybe_listen_to_websocket and listen_to_websocket to handle termination.
  • Misc:
    • Minor refactoring to improve code readability and maintainability.

This description was created by Ellipsis for 804dbe4. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 804dbe4 in 19 seconds

More details
  • Looked at 274 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. backend/windmill-api/src/websocket_triggers.rs:333
  • Draft comment:
    Redundant return type -> () in function signature. Consider removing it for clarity and conciseness.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function signature should not include '-> ()' as it is redundant in Rust for functions returning '()'.
2. backend/windmill-api/src/websocket_triggers.rs:359
  • Draft comment:
    Redundant return type -> () in function signature. Consider removing it for clarity and conciseness.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function signature should not include '-> ()' as it is redundant in Rust for functions returning '()'.
3. backend/windmill-api/src/websocket_triggers.rs:474
  • Draft comment:
    Redundant return type -> () in function signature. Consider removing it for clarity and conciseness.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function signature should not include '-> ()' as it is redundant in Rust for functions returning '()'.
4. backend/windmill-api/src/websocket_triggers.rs:595
  • Draft comment:
    Typo in error message: "Websocket cloesd" should be "Websocket closed".
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The error message contains a typo 'cloesd' which should be 'closed'.

Workflow ID: wflow_POg78DZxjN9Pcvs2


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@rubenfiszel rubenfiszel merged commit fc7bbb9 into main Oct 18, 2024
1 of 3 checks passed
@rubenfiszel rubenfiszel deleted the hc/ws-killpill branch October 18, 2024 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants