Skip to content

Commit 69d026f

Browse files
committed
use websocket connect
1 parent 185e8c7 commit 69d026f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

geoengine/workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from owslib.util import Authentication, ResponseWrapper
2626
from owslib.wcs import WebCoverageService
2727
from vega import VegaLite
28-
import websockets
28+
from websockets.asyncio.client import connect
2929
import xarray as xr
3030
import pyarrow as pa
3131

@@ -554,7 +554,7 @@ async def raster_stream(
554554
query_rectangle: QueryRectangle,
555555
open_timeout: int = 60,
556556
bands: Optional[List[int]] = None # TODO: move into query rectangle?
557-
) -> AsyncIterator[RasterTile2D]:
557+
):
558558
'''Stream the workflow result as series of RasterTile2D (transformable to numpy and xarray)'''
559559

560560
if bands is None:
@@ -584,7 +584,7 @@ async def raster_stream(
584584
if url is None:
585585
raise InputException('Invalid websocket url')
586586

587-
async with websockets.asyncio.client.connect(
587+
async with connect(
588588
uri=self.__replace_http_with_ws(url),
589589
extra_headers=session.auth_header,
590590
open_timeout=open_timeout,

0 commit comments

Comments
 (0)