Skip to content

Commit

Permalink
Merge pull request #14 from andersinno/asyncio-run
Browse files Browse the repository at this point in the history
sync scripts: Use asyncio.run instead of get_event_loop
  • Loading branch information
suutari-ai authored Jan 10, 2025
2 parents c85cf25 + a64a608 commit 14ee29b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/passari_workflow/scripts/sync_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ async def sync_attachments(offset=0, limit=None, save_progress=False):
def cli(offset, limit, save_progress):
connect_db()

loop = asyncio.get_event_loop()
loop.run_until_complete(
asyncio.run(
sync_attachments(
offset=offset, limit=limit, save_progress=save_progress
)
Expand Down
3 changes: 1 addition & 2 deletions src/passari_workflow/scripts/sync_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ async def sync_objects(offset=0, limit=None, save_progress=False):
def cli(offset, limit, save_progress):
connect_db()

loop = asyncio.get_event_loop()
loop.run_until_complete(
asyncio.run(
sync_objects(
offset=offset, limit=limit, save_progress=save_progress
)
Expand Down

0 comments on commit 14ee29b

Please sign in to comment.