Documentation for handle_reindex
¶
Functionality¶
The handle_reindex
method manages the complete reindexing process for a specified task. It updates task status, validates both source and destination iterations, and checks the existence of vector database collections. Additionally, this method logs events and manages exceptions when any operations do not succeed.
Parameters¶
task
: AReindexTaskInDb
instance containing essential details, including source and destination embedding model IDs.reindex_subworker
: An Actor responsible for processing reindex sub-tasks.deployment_worker
: An Actor that oversees model deployment and waits for its completion.deletion_worker
: An Actor dedicated to managing cleanup or deletion tasks in the event of a failure.
Usage¶
- Purpose: The method aims to execute the reindex workflow, facilitating the update of data between two embedding model iterations.
Example¶
task = get_reindex_task()
handle_reindex(task, reindex_actor, deploy_actor, delete_actor)