nyaruka / rapidpro

RapidPro is a cloud based SaaS allowing organizations to visually build scalable interactive messaging applications.
Other
36 stars 24 forks source link

Add `Broadcast.node_uuid` field #5396

Closed rowanseymour closed 1 month ago

rowanseymour commented 1 month ago

We've been doing broadcasts to nodes wrong for a while now, fetching the recipient contact ids, then saving them on the broadcast, then queueing that broadcast. It recently became noticeable because I moved the broadcast creation part into mailroom, and now we request timeout errors when someone tries to such a broadcast to a lot of contacts, because the request from RP to mailroom times out. This approach also puts potentially millions of contact ids into the task payload in Redis. Makes more sense to save the node UUID on the broadcast as part of its recipients, and then let the broadcast send task resolve that when it's resolving contact ids from queries, groups etc.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (17b8923) to head (fa2c9be).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5396 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 501 502 +1 Lines 25124 25129 +5 ========================================= + Hits 25124 25129 +5 ```

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