initial stage

This commit is contained in:
Giambattista Bloisi 2024-03-27 22:58:50 +01:00
parent 7c919f5278
commit 5fd2558a3a
1 changed files with 3 additions and 3 deletions

View File

@ -212,10 +212,10 @@ for config_name, config in configs.items():
for entity in kwargs["params"]["ENTITIES"]:
indexname = f'{entity}_{kwargs["params"]["SUFFIX"]}'
client.indices.update_aliases(
actions=[
body={"actions": [
{"remove": {"index": f"{entity}_*", "alias": entity}},
{"add": {"index": indexname, "alias": entity}},
]
]}
)
# update "allresources" alias
actions = []
@ -225,7 +225,7 @@ for config_name, config in configs.items():
actions.append({"add": {"index": "allresources", "alias": entity}})
if len(actions) > 0:
client.indices.update_aliases(
actions=actions
body={"actions": actions}
)
parallel_batches = PythonOperator(task_id="compute_parallel_batches", python_callable=compute_batches)