fix(store): replace null check with Option for stream messages
This commit is contained in:
committed by
Lala, Shahd
parent
65ddf55575
commit
4b2f3a256e
+1
-1
@@ -61,7 +61,7 @@ class GameWritebackStreamListener:
|
|||||||
">",
|
">",
|
||||||
new XReadGroupArgs().count(10).block(java.time.Duration.ofSeconds(2)),
|
new XReadGroupArgs().count(10).block(java.time.Duration.ofSeconds(2)),
|
||||||
)
|
)
|
||||||
if messages != null then messages.forEach(msg => handleMessage(msg))
|
Option(messages).foreach(_.forEach(msg => handleMessage(msg)))
|
||||||
} match
|
} match
|
||||||
case Failure(ex) => log.warnf(ex, "Error in writeback poll loop")
|
case Failure(ex) => log.warnf(ex, "Error in writeback poll loop")
|
||||||
case Success(_) => ()
|
case Success(_) => ()
|
||||||
|
|||||||
Reference in New Issue
Block a user