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

feat(spoolman): live update support #1301

Merged
merged 10 commits into from
Jan 16, 2024

Conversation

matmen
Copy link
Member

@matmen matmen commented Jan 7, 2024

Adds a WebSocket connection to listen for Spoolman state changes

Signed-off-by: Mathis Mensing <github@matmen.dev>
@matmen matmen added the FR - Enhancement New feature or request label Jan 7, 2024
@matmen
Copy link
Member Author

matmen commented Jan 7, 2024

@Donkie While implementing this, I've noticed there's no spool updates being fired when the spools filament object is updated.
Do you think it makes sense to fire update events cascadingly so a single WS connection suffices or does it make more sense to subscribe to the root endpoint and handle the state updates in the frontend (i.e. finding all spools with the associated filament ID and overwriting the vendor)?

@Donkie
Copy link

Donkie commented Jan 7, 2024

Hmm, that's not something I've thought of. I feel like it would fire a lot of events unnecessarily if I changed the backend to cascadely send events to all spools if a filament changes. If it's easy for you I think it'd be better if you also subscribe to the filament of the spool if you're interested in changes in it.

Signed-off-by: Mathis Mensing <github@matmen.dev>
Signed-off-by: Mathis Mensing <github@matmen.dev>
Signed-off-by: Mathis Mensing <github@matmen.dev>
Signed-off-by: Mathis Mensing <github@matmen.dev>
@matmen matmen marked this pull request as ready for review January 8, 2024 18:52
@matmen matmen requested a review from pedrolamas January 8, 2024 18:52
@pedrolamas pedrolamas added this to the 1.27.2 milestone Jan 16, 2024
@matmen matmen merged commit c6bcff8 into fluidd-core:develop Jan 16, 2024
4 checks passed
@matmen matmen deleted the feat/live-spoolman-updates branch January 16, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants