mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
function call cleanup
This commit is contained in:
parent
14699d3195
commit
a19838327d
1 changed files with 10 additions and 11 deletions
|
|
@ -105,8 +105,7 @@ def sync(ctx, pairs, force_delete, max_workers):
|
||||||
|
|
||||||
for pair_name, collections in parse_pairs_args(pairs, all_pairs):
|
for pair_name, collections in parse_pairs_args(pairs, all_pairs):
|
||||||
wq.spawn_worker()
|
wq.spawn_worker()
|
||||||
wq.put(
|
wq.put(lambda wq: sync_pair(wq, pair_name=pair_name,
|
||||||
functools.partial(sync_pair, pair_name=pair_name,
|
|
||||||
collections_to_sync=collections,
|
collections_to_sync=collections,
|
||||||
general=general, all_pairs=all_pairs,
|
general=general, all_pairs=all_pairs,
|
||||||
all_storages=all_storages,
|
all_storages=all_storages,
|
||||||
|
|
@ -137,11 +136,11 @@ def discover(ctx, pairs, max_workers):
|
||||||
.format(pair, list(all_pairs)))
|
.format(pair, list(all_pairs)))
|
||||||
|
|
||||||
wq.spawn_worker()
|
wq.spawn_worker()
|
||||||
wq.put(functools.partial(
|
wq.put(lambda wq: collections_for_pair(
|
||||||
(lambda wq, **kwargs: collections_for_pair(**kwargs)),
|
status_path=general['status_path'], name_a=name_a, name_b=name_b,
|
||||||
status_path=general['status_path'], name_a=name_a,
|
pair_name=pair, config_a=all_storages[name_a],
|
||||||
name_b=name_b, pair_name=pair, config_a=all_storages[name_a],
|
|
||||||
config_b=all_storages[name_b], pair_options=pair_options,
|
config_b=all_storages[name_b], pair_options=pair_options,
|
||||||
skip_cache=True))
|
skip_cache=True)
|
||||||
|
)
|
||||||
|
|
||||||
wq.join()
|
wq.join()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue