diff --git a/extensions/eda/plugins/event_source/subscription.py b/extensions/eda/plugins/event_source/subscription.py index 8554bde92..8780155ae 100644 --- a/extensions/eda/plugins/event_source/subscription.py +++ b/extensions/eda/plugins/event_source/subscription.py @@ -20,6 +20,7 @@ refresh_timeout: 60 """ + import asyncio import json import os @@ -30,6 +31,7 @@ import requests import websockets import urllib3 + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) @@ -53,7 +55,9 @@ def login(hostname: str, username: str, password: str) -> str: return token -def subscribe(hostname: str, token: str, rf_timeout: int, sub_urls: list[str]) -> list[str]: +def subscribe( + hostname: str, token: str, rf_timeout: int, sub_urls: list[str] +) -> list[str]: """ subscribe to a websocket @@ -77,7 +81,9 @@ def subscribe(hostname: str, token: str, rf_timeout: int, sub_urls: list[str]) - return sub_ids -async def refresh(hostname: str, token: str, refresh_timeout: int, sub_ids: list[str]) -> NoReturn: +async def refresh( + hostname: str, token: str, refresh_timeout: int, sub_ids: list[str] +) -> NoReturn: """ refresh subscriptions @@ -151,4 +157,4 @@ async def put(self, item): ], "refresh_timeout": 30, } - asyncio.run(main(MockQueue(), mock_arguments)) \ No newline at end of file + asyncio.run(main(MockQueue(), mock_arguments))