@@ -222,6 +222,9 @@ impl NotificationListener {
222
222
// longer than 500ms for new notifications to arrive,
223
223
// but limit the size of each batch to 128 to guarantee
224
224
// progress on a busy system
225
+ if store_events {
226
+ debug ! ( logger, "Waiting for store event" ; "queue_size" => queue_size) ;
227
+ }
225
228
let notifications: Vec < _ > = conn
226
229
. notifications ( )
227
230
. timeout_iter ( Duration :: from_millis ( 500 ) )
@@ -243,7 +246,9 @@ impl NotificationListener {
243
246
} )
244
247
. filter ( |notification| notification. channel ( ) == channel_name. 0 )
245
248
. collect ( ) ;
246
-
249
+ if store_events {
250
+ debug ! ( logger, "Received store events" ; "num_events" => notifications. len( ) , "queue_size" => conn. notifications( ) . len( ) ) ;
251
+ }
247
252
// Read notifications until there hasn't been one for 500ms
248
253
for notification in notifications {
249
254
// Terminate the thread if desired
@@ -254,6 +259,9 @@ impl NotificationListener {
254
259
match JsonNotification :: parse ( & notification, & mut conn) {
255
260
Ok ( json_notification) => {
256
261
let timeout = ENV_VARS . store . notification_broadcast_timeout ;
262
+ if store_events {
263
+ debug ! ( logger, "Broadcasting store event" ; "notification" => format!( "{:?}" , json_notification) ) ;
264
+ }
257
265
match graph:: block_on (
258
266
sender. send_timeout ( json_notification, timeout) ,
259
267
) {
0 commit comments