summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-20 21:50:37 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-20 21:50:37 +0100
commit571edc6d188923258204b1639a751a876583dcab (patch)
tree10bc3bd387fbbeeee743b2534094db038fa0f1f1
parent8c345b32a662cc44a9dd88bb6cf2cfcbfd8c773e (diff)
downloadnixos-571edc6d188923258204b1639a751a876583dcab.tar
nixos-571edc6d188923258204b1639a751a876583dcab.tar.gz
nixos-571edc6d188923258204b1639a751a876583dcab.tar.bz2
nixos-571edc6d188923258204b1639a751a876583dcab.tar.xz
nixos-571edc6d188923258204b1639a751a876583dcab.zip
zfssnap: ...
-rw-r--r--modules/zfssnap/zfssnap.py7
1 files changed, 3 insertions, 4 deletions
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():
255 255
256 tasks = [] 256 tasks = []
257 if single: 257 if single:
258 tasks.append(asyncio.create_task(do_snapshot(*single))) 258 tasks.append(do_snapshot(*single))
259 if recursive: 259 if recursive:
260 tasks.append(asyncio.create_task(do_snapshot(*recursive, recursive=True))) 260 tasks.append(do_snapshot(*recursive, recursive=True))
261 if not tasks: 261 if not tasks:
262 logger.warning('No snapshots to create') 262 logger.warning('No snapshots to create')
263 else: 263 else:
264 for task in tasks: 264 asyncio.run(asyncio.gather(tasks))
265 await task
266 for snap in all_snap_names: 265 for snap in all_snap_names:
267 logger.info(f'Created ‘{snap}’') 266 logger.info(f'Created ‘{snap}’')
268 if all_snap_names: 267 if all_snap_names: