MCPcopy
hub / github.com/pimutils/vdirsyncer / metasync

Function metasync

vdirsyncer/cli/__init__.py:160–177  ·  view source on GitHub ↗

Synchronize metadata of the given collections or pairs. See the `sync` command for usage.

(ctx, collections, max_workers)

Source from the content-addressed store, hash-verified

158@pass_context
159@catch_errors
160def metasync(ctx, collections, max_workers):
161 '''
162 Synchronize metadata of the given collections or pairs.
163
164 See the `sync` command for usage.
165 '''
166 from .tasks import prepare_pair, metasync_collection
167 from .utils import WorkerQueue
168
169 wq = WorkerQueue(max_workers)
170
171 with wq.join():
172 for pair_name, collections in collections:
173 wq.put(functools.partial(prepare_pair, pair_name=pair_name,
174 collections=collections,
175 config=ctx.config,
176 callback=metasync_collection))
177 wq.spawn_worker()
178
179
180@app.command()

Callers

nothing calls this directly

Calls 4

joinMethod · 0.95
putMethod · 0.95
spawn_workerMethod · 0.95
WorkerQueueClass · 0.85

Tested by

no test coverage detected