nyaruka / mailroom

Backend services for the TextIt platform.
Other
0 stars 1 forks source link

De-index contacts for deleted orgs #347

Closed rowanseymour closed 1 month ago

rowanseymour commented 1 month ago

Currently we need to manually clear out contacts for deleted orgs from Elastic because once contacts are hard-deleted.. rp-indexer can't see them. This adds an endpoint that will queue an org to have its contacts de-indexed bit by bit in a cron job.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 68.65672% with 21 lines in your changes missing coverage. Please review.

Project coverage is 63.33%. Comparing base (92b0a65) to head (67eca64). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
core/tasks/search/deindex_deleted_orgs.go 57.14% 8 Missing and 4 partials :warning:
core/search/index.go 80.95% 2 Missing and 2 partials :warning:
core/models/orgs.go 0.00% 2 Missing :warning:
web/org/deindex.go 81.81% 1 Missing and 1 partial :warning:
core/models/contacts.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #347 +/- ## ======================================= Coverage 63.32% 63.33% ======================================= Files 189 192 +3 Lines 10641 10701 +60 ======================================= + Hits 6738 6777 +39 - Misses 3003 3017 +14 - Partials 900 907 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.