Skip to content

Conversation

@dee077
Copy link
Member

@dee077 dee077 commented Nov 7, 2025

Implemented a new websocket endpoint 'location/all/' to handle updates for all locations simultaneously.

Fixes #191

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #191

Description of Changes

  • New endpoint created ws/loci/location/all/
  • Tests are pending

Screen Recording

Screencast.from.2025-11-07.17-47-18.webm

@dee077 dee077 changed the title [feature] Add websocket endpoint for bulk location updates #191 [feature] Add websocket endpoint for all location updates #191 Nov 7, 2025
@coveralls
Copy link

coveralls commented Nov 7, 2025

Coverage Status

coverage: 99.825% (+0.006%) from 99.819%
when pulling d58772f on feature/191-new-ws-endpoint-for-all-location
into b80853f on master.

Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

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

Good work @dee077! We need to refine this further.

from django.core.exceptions import ValidationError

location_broadcast_path = "ws/loci/location/<uuid:pk>/"
all_location_broadcast_path = "ws/loci/location/all/"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of all, can we use common_location_broadcast_path?

We can also follow the REST naming convention, but we will need to do that in backward compatible fashion. We can create a separate issue for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated!
location_broadcast_path = "ws/loci/locations/uuid:pk/"
common_location_broadcast_path = "ws/loci/locations/"
also made location_broadcast_path consistent by making location to locations
Let me know if it is not required!

Implemented a new websocket endpoint 'location/all/' to handle updates for all locations simultaneously.

Fixes #191
@dee077 dee077 force-pushed the feature/191-new-ws-endpoint-for-all-location branch from 9e8b063 to d58772f Compare December 10, 2025 12:15
@dee077 dee077 requested a review from pandafy December 10, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[feature] Add new ws endpoint for all location updates

4 participants