initial stage
This commit is contained in:
parent
7c919f5278
commit
5fd2558a3a
|
@ -212,10 +212,10 @@ for config_name, config in configs.items():
|
||||||
for entity in kwargs["params"]["ENTITIES"]:
|
for entity in kwargs["params"]["ENTITIES"]:
|
||||||
indexname = f'{entity}_{kwargs["params"]["SUFFIX"]}'
|
indexname = f'{entity}_{kwargs["params"]["SUFFIX"]}'
|
||||||
client.indices.update_aliases(
|
client.indices.update_aliases(
|
||||||
actions=[
|
body={"actions": [
|
||||||
{"remove": {"index": f"{entity}_*", "alias": entity}},
|
{"remove": {"index": f"{entity}_*", "alias": entity}},
|
||||||
{"add": {"index": indexname, "alias": entity}},
|
{"add": {"index": indexname, "alias": entity}},
|
||||||
]
|
]}
|
||||||
)
|
)
|
||||||
# update "allresources" alias
|
# update "allresources" alias
|
||||||
actions = []
|
actions = []
|
||||||
|
@ -225,7 +225,7 @@ for config_name, config in configs.items():
|
||||||
actions.append({"add": {"index": "allresources", "alias": entity}})
|
actions.append({"add": {"index": "allresources", "alias": entity}})
|
||||||
if len(actions) > 0:
|
if len(actions) > 0:
|
||||||
client.indices.update_aliases(
|
client.indices.update_aliases(
|
||||||
actions=actions
|
body={"actions": actions}
|
||||||
)
|
)
|
||||||
|
|
||||||
parallel_batches = PythonOperator(task_id="compute_parallel_batches", python_callable=compute_batches)
|
parallel_batches = PythonOperator(task_id="compute_parallel_batches", python_callable=compute_batches)
|
||||||
|
|
Loading…
Reference in New Issue