From 571edc6d188923258204b1639a751a876583dcab Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 20 Feb 2022 21:50:37 +0100 Subject: zfssnap: ... --- modules/zfssnap/zfssnap.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py index b53c6b17..2c789318 100644 --- a/modules/zfssnap/zfssnap.py +++ b/modules/zfssnap/zfssnap.py @@ -255,14 +255,13 @@ def autosnap(): tasks = [] if single: - tasks.append(asyncio.create_task(do_snapshot(*single))) + tasks.append(do_snapshot(*single)) if recursive: - tasks.append(asyncio.create_task(do_snapshot(*recursive, recursive=True))) + tasks.append(do_snapshot(*recursive, recursive=True)) if not tasks: logger.warning('No snapshots to create') else: - for task in tasks: - await task + asyncio.run(asyncio.gather(tasks)) for snap in all_snap_names: logger.info(f'Created ‘{snap}’') if all_snap_names: -- cgit v1.2.3