39131ba
It's never been called customer.id
Stephen Paul Weber created
39131ba
It's never been called customer.id
Stephen Paul Weber created
eb754a9
Use CustomerRepo
Stephen Paul Weber created
27a02de
Bring in line with the key from billing_monthly_cronjob
Stephen Paul Weber created
9347725
Customer always has a JID
Stephen Paul Weber created
56f62d1
There might be no customer
Stephen Paul Weber created
a4c8c4a
Quieter tests
Stephen Paul Weber created
4e091b6
Merge branch 'low-balance-auto-top-up'
* low-balance-auto-top-up: Some people have exactly 5 who don't need to be told On low balance, top-up or notify ExpiringLock helper
Stephen Paul Weber created
a9c201d
Some people have exactly 5 who don't need to be told
Stephen Paul Weber created
1b9bf29
On low balance, top-up or notify
On start up, check for users with low balance and NOTIFY about them. LISTEN for such notifications and process by either sending a low-balance warning message or else attempting an auto-top-up as configured. Using NOTIFY/LISTEN because then we can NOTIFY after any INSERT that leaves the balance too low (using a trigger). Doing the sync on start-up in case we missed a NOTIFY during any downtime. Using the Redis lock to prevent spamming a low-balance user in case of many restarts or if they have many small transactions happen in one day.
Stephen Paul Weber created
eaeee71
ExpiringLock helper
For things we want to do only so often, set up a helper to push expiring keys to Redis and check for them.
Stephen Paul Weber created
53d0894
hotfix
Stephen Paul Weber created
88d7cc8
Merge branch 'cancel-timeout'
* cancel-timeout: Timeout is not a fatal error When user cancels the command, respond with canceled
Stephen Paul Weber created
575da6d
Timeout is not a fatal error
If the user does not proceed with a command after N time, we don't hold on to it forever and time out. We cannot return anything to the user because they haven't sent us anything, so just ignore it.
Stephen Paul Weber created
2f33536
When user cancels the command, respond with canceled
If the cancel has not been fully handled in the body of the command, at least respond with canceled status and do not go to sentry.
Stephen Paul Weber created
e1e78a1
Braintree logs
Stephen Paul Weber created
3bccfa1
Merge branch 'command-object'
* command-object: ErrorToSend => FinalStanza Since Command#finish causes an error, a then off the end won't work Refactor commands to have Command and Command::Execution objects
Stephen Paul Weber created
d1a28bd
ErrorToSend => FinalStanza
Stephen Paul Weber created
83603be
Since Command#finish causes an error, a then off the end won't work
Stephen Paul Weber created
b363f2b
Merge branch 'statsd-logging'
* statsd-logging: Use the logger for all gems
Stephen Paul Weber created
2ece5c3
Use the logger for all gems
Stephen Paul Weber created
737a7f5
README Notes for Setup
I ran this setup from a semi-clean environment, and there were some steps I needed to do that weren't captured anywhere.
Christopher Vollick created
80f6aee
Fix usage report range
Show things from all of the start of range (today)
Stephen Paul Weber created
9a1a09e
Refactor commands to have Command and Command::Execution objects
Brings the common elements of all commands together, and threads the most useful state (such as ability to reply) through automatically using the new EMPromise fiber trampoline.
Stephen Paul Weber created
d799a92
Ask electrum to notify on new BTC addresses
Otherwise we won't know when someone has paid...
Stephen Paul Weber created
71349ef
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.
Stephen Paul Weber created
3471f2d
Merge branch 'logging'
* logging: Slightly better logging
Stephen Paul Weber created
d52e900
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.
Stephen Paul Weber created
6e8fb2e
Merge branch 'btc_spop'
* btc_spop: Get new Bitcoin address from Redis set
Stephen Paul Weber created
a7f39ff
Get new Bitcoin address from Redis set
This set is populated by a cron job to have only known-good available addresses in it.
Stephen Paul Weber created
5bbec00
typo
Stephen Paul Weber created
39741b7
On SGX register! failure, return a useful error to user
Stephen Paul Weber created
a58d09c
Explicitly wrap errors we want to send
Stephen Paul Weber created
75362f5
Sync/flush stdout when logging
Stephen Paul Weber created
13db097
Set type map on *all* connections in pool
Stephen Paul Weber created
35bce21
monthly_price is in 10000ths of a dollar, not 1000ths
Stephen Paul Weber created
4922e6b
Alt registration payment wording
Stephen Paul Weber created
decdb12
Command cancel rejects the promise
So it won't be taken as next by naive code.
Stephen Paul Weber created
b64408f
No more "choose next"
Instead, adhoc bot will show the options for actions to take
Stephen Paul Weber created
313111a
Set catapult_fwd_timeout on our backend-facing JID
Not on our inbound-facing JID. This is why we shouldn't be mucking in the SGX's Redis at all...
Stephen Paul Weber created
7e4d61d
Fix Invites with Empty Guard
Turns out every user will start with no attempts, and the code wasn't handling that case. Oops.
Christopher Vollick created
1e8eef2
Set location (API calls it "SipPeer") on new TN orders
Stephen Paul Weber created
5b36a8c
Funnel statsd for registration
Stephen Paul Weber created
2c2975d
Import group-text fix from prod
Stephen Paul Weber created
a4621ec
Cheogram should not save the route since signup is not done
Stephen Paul Weber created
33e8ec5
typo
Stephen Paul Weber created
324f326
Add disco info features
Stephen Paul Weber created
1c26971
Show current balance in alt top up form
Stephen Paul Weber created
1148e56
Signup should work if rate center lookup fails
Stephen Paul Weber created
8965c1b
error of type error
Stephen Paul Weber created
8fc925f
hotfix
Stephen Paul Weber created