- for module_shard in conf['module-shards']:
- module_shard["shards"][0]["replicas"] = ["member-{}".format(i+1) for i in range(int(nodes))]
- if shard_name != '' and replicas != []:
- conf['module-shards'].append(
- pyhocon.ConfigTree([("name", shard_name),
- ("shards", [pyhocon.ConfigTree(
- [("name", shard_name),
- ("replicas", ["member-{}".format(i) for i in replicas])])])]))
+ for module_shard in conf["module-shards"]:
+ module_shard["shards"][0]["replicas"] = [
+ "member-{}".format(i + 1) for i in range(int(nodes))
+ ]
+ if shard_name != "" and replicas != []:
+ conf["module-shards"].append(
+ pyhocon.ConfigTree(
+ [
+ ("name", shard_name),
+ (
+ "shards",
+ [
+ pyhocon.ConfigTree(
+ [
+ ("name", shard_name),
+ (
+ "replicas",
+ ["member-{}".format(i) for i in replicas],
+ ),
+ ]
+ )
+ ],
+ ),
+ ]
+ )
+ )