Skip to content

Segment-edit-triggered membership count refresh #7470

Closed

Description

@khvn26

Scope

Add a Segment.post_save(version_of_id == id) signal handler that enqueues a new task, e.g. refresh_segment_counts(segment_id) to update the membership counts for that specific segment across all environments in the project. The Alpha daily refresh stays as a safety net; the segment-edit path means a saved segment refreshes its counts within minutes, not the next day.

Debounce: if a refresh for the same project is already pending or running, the signal is a no-op.

Acceptance criteria

  • Saving a canonical segment edit enqueues exactly one task.
  • Saving a non-canonical segment revision (version_of_id != id) does not enqueue.
  • Saving when the org has the FoF flag off does not enqueue.
  • Existing daily fallback continues to refresh projects whose segments haven't been edited.

Activity

  1. added
    apiIssue related to the REST API
    on May 9, 2026
  2. added theissue type on May 9, 2026
  3. changed the title [-]Segment-edit-triggered count refresh[/-] [+]Segment-edit-triggered membership count refresh[/+] on May 9, 2026
  4. SahilJat commented on May 29, 2026

    @SahilJat
    Contributor

    Hii @khvn26 if someone has not started working on it, should i go ahead and give it a try?

  5. self-assigned this
    on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiIssue related to the REST API

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions