Skip to content

Add script to reconcile keys and quotas in Redis. - #2052

Open
neprune wants to merge 2 commits into
masterfrom
reconcile-redis
Open

Add script to reconcile keys and quotas in Redis.#2052
neprune wants to merge 2 commits into
masterfrom
reconcile-redis

Conversation

@neprune

@neprune neprune commented Aug 13, 2026

Copy link
Copy Markdown

@mysociety-pusher
mysociety-pusher force-pushed the reconcile-redis branch 2 times, most recently from fab8f38 to cb9d346 Compare August 14, 2026 11:38
@neprune

neprune commented Aug 14, 2026

Copy link
Copy Markdown
Author

Dry run against live:

  • 6 API keys in Redis with no DB record that would be deleted.
  • 2 quotas in Redis with no DB record that would be deleted (seemed related to testing).
  • All but 10 stripe subs were 'active'. These were 'incomplete_expired'. Most have active API keys and also quota set-up in Redis, but at least wouldn't have had their counts reset. I think this is because stripe isn't firing customer.subscription.deleted in this scenario and we're not checking the status in our 'updated' hook logic.

incomplete_expired scenario needs a proper look but for now just updating this script to delete these as it already does for canceled.

@neprune
neprune requested a review from dracos August 14, 2026 13:11
@neprune
neprune marked this pull request as ready for review August 14, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant