Skip to content

Commit

Permalink
Fix unclosed aiohttp sessions (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Jun 21, 2021
1 parent 1be3c3a commit 05f368f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dipdup/dipdup.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ async def run(self, reindex: bool, oneshot: bool) -> None:
await asyncio.gather(*datasource_tasks, *worker_tasks)
except KeyboardInterrupt:
pass

self._logger.info('Closing datasource sessions')
await asyncio.gather(*[d.close_session() for d in self._datasources.values()])
finally:
self._logger.info('Closing datasource sessions')
await asyncio.gather(*[d.close_session() for d in self._datasources.values()])

async def migrate(self) -> None:
codegen = DipDupCodeGenerator(self._config, self._datasources_by_config)
Expand Down

0 comments on commit 05f368f

Please sign in to comment.