def METHOD_NAME(celery_job, schemas, elastic_host, task_index):
    logger.info(f"Migration starts for elastic: {elastic_host}")
    schemas = [MigrationSchema(**schema) for schema in schemas]
    total = len(schemas)
    progress = 0
    for schema in schemas:
        logger.info(f"Scheduled migration of {schema.copy_index.from_index} to {schema.copy_index.to_index}")
    update_progress(celery_job, progress, total)
    # Adds task to database
    add_task(elastic_host, task_index, "Migration plan orchestrator", celery_job)
    sync_chain = None
    for schema in schemas:
        if schema.asynchronous is True:
            result = run_migration_worker.delay(schema.worker, schema.dict(), elastic_host, task_index)
            logger.info(f"Running worker {schema.worker} as job {result}")
        else:
            sync_chain = run_migration_worker.s(schema.worker, schema.dict(), elastic_host, task_index) if sync_chain \
                is None else sync_chain | run_migration_worker.s(schema.worker, schema.dict(), elastic_host, task_index)
        progress += 1
        if celery_job:
            celery_job.update_state(state="PROGRESS", meta={"current": progress, "total": total})
    if sync_chain is not None:
        sync_chain.delay()