~singpolyma/sgx-jmp

88d89128b38e555638dbcffeecd9322c97887a17 — Stephen Paul Weber 8 days ago 51c450d
Add some more verbose logs

To help tracing stuff back from endstream
1 files changed, 2 insertions(+), 0 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +2 -0
@@ 269,12 269,14 @@ before nil, to: /\Acustomer_/, from: /(\A|@)#{FROM_BACKEND}(\/|\Z)/ do |s|
	StatsD.increment("stanza_customer")

	Sentry.get_current_scope.set_transaction_name("stanza_customer")
	log.info "Stanza from backend, check for customer #{s.to} / #{s.from}"
	CustomerRepo.new(set_user: Sentry.method(:set_user)).find(
		s.to.node.delete_prefix("customer_")
	).then do |customer|
		ReachabilityRepo::SMS.new
			.find(customer, s.from.node, stanza: s).then do |reach|
				reach.filter do
					log.info "Stanza from backend, send to customer #{s.to} / #{s.from}"
					customer.stanza_to(s)
				end
			end