ref: d799a928330b0a8709084e8ea6a431979949a37e sgx-jmp/sgx_jmp.rb -rw-r--r-- 15.0 KiB
Factor out CustomerRepo

Using the Repository pattern to encapsulate the fetch and create operations on
the persistence layer for a domain object.  These were not really factories in
the classic sense, but rather "fetch from persisitence layer" methods, and so
they now have a home.
Merge branch 'logging'

* logging:
  Slightly better logging
Slightly better logging

Import structured logging gem ougai and replace current use of puts/warn with
logging calls.  Gives us level, timestamp, and formatting for exceptions and/or
hash of arbitrary context data.  Can do JSON logging if we ever need that, but
set to human-readable (with colour if isatty) for now.
Merge branch 'btc_spop'

* btc_spop:
  Get new Bitcoin address from Redis set
Get new Bitcoin address from Redis set

This set is populated by a cron job to have only known-good available addresses
in it.
Explicitly wrap errors we want to send
Sync/flush stdout when logging
Set type map on *all* connections in pool
Command cancel rejects the promise

So it won't be taken as next by naive code.
Funnel statsd for registration
Import group-text fix from prod
Add disco info features
Fix sending to MUC
Send to StatsD for different inbound stanza types
Only count billable messages

Not typing indicators, etc.
Notify admin if a user goes over 500 messages in 30 days

Notify only once per day (using expiring redis key).
Can notify MUC or user, always sends directed presence first so it will join MUC
if not joined.
Ignore all messages direct to the component, mostly to throw out live messages
from MUC if we join that to notify.
Tell user about bonus amount when doing credit card top up
Use PG connection pool