Fix bug 1537 to send dummy message to all kafka topics during startup 54/10854/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 20 May 2021 11:08:05 +0000 (13:08 +0200)
committersousaedu <eduardo.sousa@canonical.com>
Fri, 21 May 2021 11:38:53 +0000 (13:38 +0200)
Change-Id: I1ceeae4236f45fad1c971276412c71b6eb67c9de
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
NG-RO/osm_ng_ro/vim_admin.py

index 17bfb20..d875272 100644 (file)
@@ -277,9 +277,10 @@ class VimAdminThread(threading.Thread):
             try:
                 if not self.aiomain_task_kafka:
                     # await self.msg.aiowrite("admin", "echo", "dummy message", loop=self.loop)
-                    await self.msg.aiowrite(
-                        "vim_account", "echo", "dummy message", loop=self.loop
-                    )
+                    for kafka_topic in self.kafka_topics:
+                        await self.msg.aiowrite(
+                            kafka_topic, "echo", "dummy message", loop=self.loop
+                        )
                     kafka_working = True
                     self.logger.debug("Starting vim_account subscription task")
                     self.aiomain_task_kafka = asyncio.ensure_future(