mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix metasync
This commit is contained in:
parent
4b41f4050f
commit
ed0bc9b532
1 changed files with 7 additions and 6 deletions
|
|
@ -102,18 +102,19 @@ def repair_collection(config, collection):
|
||||||
repair_storage(storage)
|
repair_storage(storage)
|
||||||
|
|
||||||
|
|
||||||
def metasync_collection(wq, pair, collection, general):
|
def metasync_collection(wq, collection, general):
|
||||||
from ..metasync import metasync
|
from ..metasync import metasync
|
||||||
status_name = get_status_name(pair.name, collection)
|
pair = collection.pair
|
||||||
|
status_name = get_status_name(pair.name, collection.name)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cli_logger.info('Metasyncing {}'.format(status_name))
|
cli_logger.info('Metasyncing {}'.format(status_name))
|
||||||
|
|
||||||
status = load_status(general['status_path'], pair.name,
|
status = load_status(general['status_path'], pair.name,
|
||||||
collection, data_type='metadata') or {}
|
collection.name, data_type='metadata') or {}
|
||||||
|
|
||||||
a = storage_instance_from_config(pair.config_a)
|
a = storage_instance_from_config(collection.config_a)
|
||||||
b = storage_instance_from_config(pair.config_b)
|
b = storage_instance_from_config(collection.config_b)
|
||||||
|
|
||||||
metasync(
|
metasync(
|
||||||
a, b, status,
|
a, b, status,
|
||||||
|
|
@ -124,5 +125,5 @@ def metasync_collection(wq, pair, collection, general):
|
||||||
handle_cli_error(status_name)
|
handle_cli_error(status_name)
|
||||||
raise JobFailed()
|
raise JobFailed()
|
||||||
|
|
||||||
save_status(general['status_path'], pair.name, collection,
|
save_status(general['status_path'], pair.name, collection.name,
|
||||||
data_type='metadata', data=status)
|
data_type='metadata', data=status)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue