You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2023/06/06 20:01:34 UTC

[streampipes] 01/01: fix(1656): adapt to API change in nats-py (pass list instead of single str)

This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch 1656-fix-failing-ci
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit ccd18c2f1df9a5038270c48abb89f3dfa9d87ce3
Author: bossenti <bo...@posteo.de>
AuthorDate: Tue Jun 6 22:01:19 2023 +0200

    fix(1656): adapt to API change in nats-py (pass list instead of single str)
    
    Signed-off-by: bossenti <bo...@posteo.de>
---
 streampipes-client-python/docs/img/interrogate_badge.svg          | 8 ++++----
 .../streampipes/functions/broker/nats/nats_consumer.py            | 2 +-
 .../streampipes/functions/broker/nats/nats_publisher.py           | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/streampipes-client-python/docs/img/interrogate_badge.svg b/streampipes-client-python/docs/img/interrogate_badge.svg
index c4d5627de..ea7a3fa7f 100644
--- a/streampipes-client-python/docs/img/interrogate_badge.svg
+++ b/streampipes-client-python/docs/img/interrogate_badge.svg
@@ -1,5 +1,5 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="140" height="20" role="img" aria-label="interrogate: 100%">
-    <title>interrogate: 100%</title>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="140" height="20" role="img" aria-label="interrogate: 99.7%">
+    <title>interrogate: 99.7%</title>
     <linearGradient id="s" x2="0" y2="100%">
         <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
         <stop offset="1" stop-opacity=".1"/>
@@ -15,8 +15,8 @@
     <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
         <text aria-hidden="true" x="590" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="610">interrogate</text>
         <text x="590" y="140" transform="scale(.1)" fill="#fff" textLength="610">interrogate</text>
-        <text aria-hidden="true" x="1160" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">100%</text>
-        <text x="1160" y="140" transform="scale(.1)" fill="#fff" textLength="330" data-interrogate="result">100%</text>
+        <text aria-hidden="true" x="1160" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">99.7%</text>
+        <text x="1160" y="140" transform="scale(.1)" fill="#fff" textLength="370" data-interrogate="result">99.7%</text>
     </g>
     <g id="logo-shadow" transform="matrix(0.854876,0,0,0.854876,-6.73514,1.732)">
         <g transform="matrix(0.299012,0,0,0.299012,9.70229,-6.68582)">
diff --git a/streampipes-client-python/streampipes/functions/broker/nats/nats_consumer.py b/streampipes-client-python/streampipes/functions/broker/nats/nats_consumer.py
index b57f0f35b..ce968a5aa 100644
--- a/streampipes-client-python/streampipes/functions/broker/nats/nats_consumer.py
+++ b/streampipes-client-python/streampipes/functions/broker/nats/nats_consumer.py
@@ -43,7 +43,7 @@ class NatsConsumer(Consumer):
         None
 
         """
-        self.nats_client = await connect(f"nats://{hostname}:{port}")
+        self.nats_client = await connect([f"nats://{hostname}:{port}"])
         logger.info(f"Connecting to NATS at {hostname}:{port}")
 
     async def _create_subscription(self) -> None:
diff --git a/streampipes-client-python/streampipes/functions/broker/nats/nats_publisher.py b/streampipes-client-python/streampipes/functions/broker/nats/nats_publisher.py
index 37ffa4e78..60543bd69 100644
--- a/streampipes-client-python/streampipes/functions/broker/nats/nats_publisher.py
+++ b/streampipes-client-python/streampipes/functions/broker/nats/nats_publisher.py
@@ -44,7 +44,7 @@ class NatsPublisher(Publisher):
         None
 
         """
-        self.nats_client = await connect(f"nats://{hostname}:{port}")
+        self.nats_client = await connect([f"nats://{hostname}:{port}"])
         logger.info(f"Connecting to NATS at {hostname}:{port}")
 
     async def publish_event(self, event: Dict[str, Any]):