def commit_migration(migration): plan_by_db = { shard_allocation.db_name: shard_allocation for shard_allocation in migration.shard_plan } shard_allocations = get_shard_allocation_from_plan( migration.source_couch_config, plan_by_db, create=True) for shard_allocation_doc in shard_allocations: response = put_shard_allocation(migration.target_couch_config, shard_allocation_doc) print(response)
def commit_migration(migration): plan_by_db = { shard_allocation.db_name: shard_allocation for shard_allocation in migration.shard_plan } shard_allocations = get_shard_allocation_from_plan( migration.source_couch_config, plan_by_db, create=True ) for shard_allocation_doc in shard_allocations: response = put_shard_allocation(migration.target_couch_config, shard_allocation_doc) print(response)