roam/daily/2022-05-31.org
2022-06-08 16:50:50 -04:00

1.7 KiB

2022-05-31

Normalizing tags in production

  SELECT COUNT(*)
  FROM accounts
  WHERE NOT normalized
Find the next set of least affected accounts
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)

/correlr/roam/src/commit/3b2f25715aacea628a65677bcea865ae4db12670/daily/~/git/normalize_account_tags/production/10-top-accounts

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