3102 Group Real Time Oral Argument Alerts #4251
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in #3102, in this PR I've enabled grouping of RT OA Search Alerts. It uses the same approach applied in #4200, so alerts are stored as
ScheduledAlertHit
in the DB and then grouped and sent every 5 minutes by thecl_send_rt_percolator_alerts
daemon.One difference between OA Alerts and RECAP Alerts now is that we don't use a Redis set for OA Alerts to avoid sending an alert more than once. The reason is that for OA, we only percolate the audio once after it's created and processed by Doctor.
A question here: Is it possible for an Audio to change its content after a re-import or re-scraping? If this is possible, I think we should change the approach of percolating audio files and do it also on updates. In that case, we'd need to use a Redis set to avoid duplicating alerts for the same document.
Let me know what do you think.