Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/dipdup/datasources/tzkt/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ def submit(self, fn, *args, **kwargs):

async def run(self):
while True:
await asyncio.sleep(0.1)
try:
coro = self._queue.popleft()
await coro
except IndexError:
await asyncio.sleep(0.1)
pass
except asyncio.CancelledError:
return

Expand Down Expand Up @@ -369,8 +370,8 @@ async def start(self):
if not rest_only:
self._logger.info('Starting websocket client')
await asyncio.gather(
await self._get_client().start(),
await self._callback_executor.run(),
self._get_client().start(),
self._callback_executor.run(),
)

async def stop(self):
Expand Down