CodeWithAsheville / court-notifications

GNU General Public License v3.0
11 stars 10 forks source link

2022-06-18: Minimize chance to unsubscribe because courts are slow to update new court dates #146

Closed ejaxon closed 2 years ago

ejaxon commented 2 years ago

It can happen that there is a delay between a scheduled court date that is either continue or at which the defendant fails to appear and a new court date showing up in the state courts website. When that happens, we can end up purging a subscriber prematurely.

We have changed the language of the unsubscribe notification to be less categorical and delayed the actual purge for 7 days, but the update function can still end up causing a defendant to be purged. This is because we delete their past court dates and then replace them with the new ones. If there are no new ones, the defendants and subscriptions will end up being purged anyway.

Because we have multiple update functions interacting with sometimes unreliable external information sources, this needs to be carefully thought through. I'd also like to diagram it so that we can share with court officials and County communications folks.

ejaxon commented 2 years ago

Update on the plan for this. Right now we purge expired court dates after a specified number of days. However, we also update records for every defendant once a week, which also erases any expired court dates. So the purge is basically useless extra work, and makes fixing this more complicated. So the fix here is as follows: