Skip to content

Commit

Permalink
use high-level asyncio funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Oct 4, 2023
1 parent 2409a60 commit c445c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aleph/sdk/node/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def watch_messages(

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

# start listening to the network and storing messages in the cache
asyncio.get_event_loop().create_task(
asyncio.create_task(
self.listen_to(
self.session.watch_messages(
channels=self.channels,
Expand All @@ -401,7 +401,7 @@ def __init__(
)

# synchronize with past messages
asyncio.get_event_loop().run_until_complete(
asyncio.run(
self.synchronize(
channels=self.channels,
tags=self.tags,
Expand Down

0 comments on commit c445c01

Please sign in to comment.