Skip to content

Commit c445c01

Browse files
committed
use high-level asyncio funcs
1 parent 2409a60 commit c445c01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/aleph/sdk/node/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ async def watch_messages(
354354

355355
class DomainNode(MessageCache, BaseAuthenticatedAlephClient):
356356
"""
357-
A Domain Node is a queryable proxy for Aleph Messages that are stored in a database cache and/or in the Aleph
357+
A Domain Node is a queryable proxy for aleph.im Messages that are stored in a database cache and/or in the aleph.im
358358
network.
359359
360360
It synchronizes with the network on a subset of the messages (the "domain") by listening to the network and storing the
@@ -388,7 +388,7 @@ def __init__(
388388
self.message_types = message_types
389389

390390
# start listening to the network and storing messages in the cache
391-
asyncio.get_event_loop().create_task(
391+
asyncio.create_task(
392392
self.listen_to(
393393
self.session.watch_messages(
394394
channels=self.channels,
@@ -401,7 +401,7 @@ def __init__(
401401
)
402402

403403
# synchronize with past messages
404-
asyncio.get_event_loop().run_until_complete(
404+
asyncio.run(
405405
self.synchronize(
406406
channels=self.channels,
407407
tags=self.tags,

0 commit comments

Comments
 (0)