Run billing 3 at a time All at once kills the box
Merge branch 'bill-via-sgx-jmp' * bill-via-sgx-jmp: Billing monthly cronjob using sgx-jmp
Billing monthly cronjob using sgx-jmp Just get the list of expired customers and tell sgx-jmp about each of them, wait until all return or one errors and log result.
Merge branch 'do-not-bill-unregistered' * do-not-bill-unregistered: Query sgx-jmp for every expired user Show backtrace and bail out hard on panic
Merge branch 'rubocop' * rubocop: Update rubocop
Query sgx-jmp for every expired user If they have no assigned tel, do not bill them or notify them.
Show backtrace and bail out hard on panic
Update rubocop And use settings from sgx-jmp
Exit after an error in EM
Do not wait to exit until after we are ready
Do not hang forever if shutdown fails
Wait until fully disconnected before EM.stop
Fix intermittent notification non-delivery We need to wait until all EventMachine items in flight are complete before we allow the process to terminate or some of them might not happen. So when the process wants to exit, wait until the EM thread is done. Use next_tick to make sure our stop command only happens when the EM queue is next clear.
Higher XMPP connect timeout Because sometimes the box is under high load.
Notify customer when renewal fails due to low balance This is done by sending from a configured JID to <tel>@cheogram.com in order to have them receive a message from support.