Skip to content

Commit 14ee29b

Browse files
authored
Merge pull request #14 from andersinno/asyncio-run
sync scripts: Use asyncio.run instead of get_event_loop
2 parents c85cf25 + a64a608 commit 14ee29b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/passari_workflow/scripts/sync_attachments.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ async def sync_attachments(offset=0, limit=None, save_progress=False):
223223
def cli(offset, limit, save_progress):
224224
connect_db()
225225

226-
loop = asyncio.get_event_loop()
227-
loop.run_until_complete(
226+
asyncio.run(
228227
sync_attachments(
229228
offset=offset, limit=limit, save_progress=save_progress
230229
)

src/passari_workflow/scripts/sync_objects.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ async def sync_objects(offset=0, limit=None, save_progress=False):
221221
def cli(offset, limit, save_progress):
222222
connect_db()
223223

224-
loop = asyncio.get_event_loop()
225-
loop.run_until_complete(
224+
asyncio.run(
226225
sync_objects(
227226
offset=offset, limit=limit, save_progress=save_progress
228227
)

0 commit comments

Comments
 (0)