async def get_all_by_sync_id(
        self,
        db: AsyncSession,
        sync_id: UUID,
    ) -> list[SyncJob]:
        """Get all jobs for a specific sync."""
        stmt = (
            select(SyncJob, Sync.name.label("sync_name"))
            .join(Sync, SyncJob.sync_id == Sync.id)
            .where(SyncJob.sync_id == sync_id)
        )
        result = await db.execute(stmt)
        jobs = []
        for job, sync_name in result:
            job.sync_name = sync_name
            jobs.append(job)
        return jobs
Get all jobs for a specific sync.
backend/airweave/crud/crud_sync_job.py