1.7 KiB
1.7 KiB
2022-05-31
Normalizing tags in production
count |
---|
315 |
SELECT account_id
FROM accounts
WHERE NOT normalized ORDER BY total
(let ((filename "~/git/normalize_account_tags/production/10-top-accounts"))
(with-temp-file filename
(insert (s-join "\n" (-map #'car accounts))))
filename)
Updating subscriber-sync creation logic
Recipient Service will be configured to read data from AppDB rather than DynamoDB. Subscriber sync will not know the subscriber's recipient record may not already exist, and has no way of looking up the recipient record to check.
On Creation
- Create recipient record if none exists for the subscriber's normalized email address
- Associate the subscriber with the recipient record
On Update
- If the normalized email address has changed, look up the old and new recipient records and update their subscriber associations
On Delete
- Look up the recipient record and update the subscriber association