Throttle notification processing to prevent starvation

Stephen Paul Weber created

Change summary

sgx_jmp.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

sgx_jmp.rb 🔗

@@ -210,7 +210,7 @@ def poll_for_notify(db)
 			DbNotification.for(notify, customer, repo)
 		end
 	}.then(&:call).then {
-		poll_for_notify(db)
+		EM.add_timer(0.5) { poll_for_notify(db) }
 	}.catch(&method(:panic))
 end