async def trigger_sync_run(
        self,
        db: AsyncSession,
        sync_id: UUID,
        current_user: schemas.User,
    ) -> tuple[schemas.Sync, schemas.SyncJob, schemas.SyncDag]:
        """Trigger a sync run.

        TODO: Does not actually run the sync, just creates the job and DAG.
        The actual sync run is triggered by background task in the endpoint.
        At some point this method will distribute to task queue.

        Args:
        ----
            db (AsyncSession): The database session.
            sync_id (UUID): The ID of the sync to run.
            current_user (schemas.User): The current user.

        Returns:
        -------
            tuple[schemas.Sync, schemas.SyncJob, schemas.SyncDag]: The sync, job, and DAG.

        Raises:
        ------
            HTTPException: If the sync is not found.
        """
        sync = await crud.sync.get(
            db=db, id=sync_id, current_user=current_user, with_connections=True
        )
        if not sync:
            raise HTTPException(status_code=404, detail="Sync not found")

        sync_schema = schemas.Sync.model_validate(sync)

        sync_job_in = schemas.SyncJobCreate(sync_id=sync_id)
        sync_job = await crud.sync_job.create(db=db, obj_in=sync_job_in, current_user=current_user)
        await db.flush()
        sync_job_schema = schemas.SyncJob.model_validate(sync_job)

        sync_dag = await crud.sync_dag.get_by_sync_id(
            db=db, sync_id=sync_id, current_user=current_user
        )
        sync_dag_schema = schemas.SyncDag.model_validate(sync_dag)

        return sync_schema, sync_job_schema, sync_dag_schema
Trigger a sync run.

        TODO: Does not actually run the sync, just creates the job and DAG.
        The actual sync run is triggered by background task in the endpoint.
        At some point this method will distribute to task queue.

        Args:
        ----
            db (AsyncSession): The database session.
            sync_id (UUID): The ID of the sync to run.
            current_user (schemas.User): The current user.

        Returns:
        -------
            tuple[schemas.Sync, schemas.SyncJob, schemas.SyncDag]: The sync, job, and DAG.

        Raises:
        ------
            HTTPException: If the sync is not found.
        
backend/airweave/core/sync_service.py