~singpolyma/sgx-jmp

e5b66f4d5b0477ed2746aaf44e870e43908269b1 — Stephen Paul Weber 10 months ago b4b54eb
Allow fetching fwd timeout as well
2 files changed, 6 insertions(+), 1 deletions(-)

M lib/backend_sgx.rb
M lib/customer.rb
M lib/backend_sgx.rb => lib/backend_sgx.rb +4 -0
@@ 37,6 37,10 @@ class BackendSgx
		REDIS.get("catapult_ogm_url-#{from_jid}")
	end

	def fwd_timeout
		REDIS.get("catapult_fwd_timeout-#{from_jid}")
	end

	def set_fwd_timeout(timeout)
		REDIS.set("catapult_fwd_timeout-#{from_jid}", timeout)
	end

M lib/customer.rb => lib/customer.rb +2 -1
@@ 21,7 21,8 @@ class Customer
	attr_reader :customer_id, :balance, :jid
	def_delegators :@plan, :active?, :activate_plan_starting_now, :bill_plan,
	               :currency, :merchant_account, :plan_name, :auto_top_up_amount
	def_delegators :@sgx, :register!, :registered?, :set_fwd_timeout
	def_delegators :@sgx, :register!, :registered?,
	               :fwd_timeout, :set_fwd_timeout
	def_delegators :@usage, :usage_report, :message_usage, :incr_message_usage

	def initialize(