Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

Fixes a bug where the entity_type notification was being repeatedly sent in the channel due to multiple signal instances in one case.

@whitdog47 whitdog47 requested review from aaronherman and Copilot June 9, 2025 23:26
@whitdog47 whitdog47 self-assigned this Jun 9, 2025
@whitdog47 whitdog47 added the bug Something isn't working label Jun 9, 2025

This comment was marked as outdated.

whitdog47 and others added 2 commits June 10, 2025 14:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: David Whittaker <84562015+whitdog47@users.noreply.github.com>
@whitdog47 whitdog47 requested a review from Copilot June 10, 2025 22:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the entity update notification so it’s sent only once per batch rather than per signal instance, reducing duplicate messages.

  • Move notification send logic from the flow to the view’s batch handler
  • Remove per-instance notification and related imports from flows.py
  • Add logging around the notification call to catch failures

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/dispatch/entity_type/views.py Send notification once after processing all signal instances
src/dispatch/entity_type/flows.py Remove per-instance notification logic and unused imports
Comments suppressed due to low confidence (1)

src/dispatch/entity_type/views.py:120

  • Add a unit or integration test to confirm that the notification is sent exactly once for multiple signal instances, and that it’s not sent when no instances are updated.
send_entity_update_notification(

@whitdog47 whitdog47 merged commit 2fde0ed into main Jun 10, 2025
9 checks passed
@whitdog47 whitdog47 deleted the fix/entity-update-notification-send-once branch June 10, 2025 22:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants