https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
schedulable_ti_ids.append((ti.task_id, ti.map_index))
        count = 0
        if schedulable_ti_ids:
            schedulable_ti_ids_chunks = chunks(
                schedulable_ti_ids, max_tis_per_query or len(schedulable_ti_ids)
            )
            for schedulable_ti_ids_chunk in schedulable_ti_ids_chunks:
                count += session.execute(
                    update(TI)
                    .where(
                        TI.dag_id == self.dag_id,
                        TI.run_id == self.run_id,
                        tuple_in_condition((TI.task_id, TI.map_index), schedulable_ti_ids_chunk),
                    )
                    .values(state=TaskInstanceState.SCHEDULED)
                    .execution_options(synchronize_session=False)
                ).rowcount
        
        if dummy_ti_ids:
            dummy_ti_ids_chunks = chunks(dummy_ti_ids, max_tis_per_query or len(dummy_ti_ids))
            for dummy_ti_ids_chunk in dummy_ti_ids_chunks:
                count += session.execute(
                    update(TI)
                    .where(
                        TI.dag_id == self.dag_id,
                        TI.run_id == self.run_id,
                        tuple_in_condition((TI.task_id, TI.map_index), dummy_ti_ids_chunk),
                    )
                    .values(
                        state=TaskInstanceState.SUCCESS,