:PROPERTIES: :ID: c1a4dc1f-abdd-4ee7-891d-6441af049642 :END: #+title: 2022-05-20 * [[id:d06d3ab4-c2d0-47c3-aae1-4395567fc3d2][Normalizing tags]] in production :PROPERTIES: :header-args:sql: :engine postgresql :cmdline "-U postgres postgres" :dir /docker:postgres: :exports both :cache yes :eval no-export :END: #+CAPTION: Find the next set of least affected accounts #+begin_src sql SELECT COUNT(*) FROM accounts WHERE NOT normalized AND total <= 10 #+end_src #+RESULTS[95dd01f1826657f1d72cf437dd5c045cf78c997c]: | count | |-------| | 759 | #+CAPTION: Find the next set of least affected accounts #+NAME: 02-less-than-equal-to-ten #+begin_src sql :results silent SELECT account_id FROM accounts WHERE NOT normalized AND total <= 10 #+end_src #+begin_src emacs-lisp :var accounts=02-less-than-equal-to-ten :results file :eval no-export (let ((filename "~/git/normalize_account_tags/production/02-less-than-equal-to-ten")) (with-temp-file filename (insert (s-join "\n" (-map #'car accounts)))) filename) #+end_src #+RESULTS: [[file:~/git/normalize_account_tags/production/02-less-than-equal-to-ten]] #+begin_src sql UPDATE accounts SET normalized = TRUE WHERE NOT normalized AND total <= 10 #+end_src #+RESULTS[758c043c5bfacfb10f6a17c306ca76536b92abee]: | UPDATE 759 | |------------| * Sync up on [[id:1ff6586e-2dba-41a2-a887-753cc5ac27c9][Recipient Service]] updates - Andrew is still working on tests for the updated =GET= endpoints due to unrelated sprockets amqp ioloop issues. - Subscriber sync change needs to be done next to check for existence of the recipient record rather than the subscriber record, as the latter will now always exist. * Senior engineering meet up - Create a ticket to add an api-suspenders style queuing system in the [[id:1ff6586e-2dba-41a2-a887-753cc5ac27c9][Recipient Service]]'s subscriber creation implementation using redis for storage.