~singpolyma/sgx-jmp

a9c201d695c018d21233721850c36b73db74b723 — Stephen Paul Weber 3 years ago 1b9bf29
Some people have exactly 5 who don't need to be told
1 files changed, 1 insertions(+), 1 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +1 -1
@@ 171,7 171,7 @@ when_ready do

	DB.hold do |conn|
		conn.query("LISTEN low_balance")
		conn.query("SELECT customer_id FROM balances WHERE balance <= 5").each do |c|
		conn.query("SELECT customer_id FROM balances WHERE balance < 5").each do |c|
			conn.query("SELECT pg_notify('low_balance', $1)", c.values)
		end
		poll_for_notify(conn)