nixos/znapzend: Run znapzendzetup import in parallel
Patch by @Baughn, who noticed these imports being very slow when run serially with many datasets, so much that the service would time out and fail, this fixes it.
This commit is contained in:
parent
0ac83f0857
commit
cf2f5850e2
|
@ -382,8 +382,10 @@ in
|
|||
| xargs -I{} ${pkgs.znapzend}/bin/znapzendzetup delete "{}"
|
||||
'' + concatStringsSep "\n" (mapAttrsToList (dataset: config: ''
|
||||
echo Importing znapzend zetup ${config} for dataset ${dataset}
|
||||
${pkgs.znapzend}/bin/znapzendzetup import --write ${dataset} ${config}
|
||||
'') files);
|
||||
${pkgs.znapzend}/bin/znapzendzetup import --write ${dataset} ${config} &
|
||||
'') files) + ''
|
||||
wait
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = let
|
||||
|
|
Loading…
Reference in New Issue