https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
"""
        Refresh the task instance from the database based on the primary key.
        :param session: SQLAlchemy ORM Session
        :param lock_for_update: if True, indicates that the database should
            lock the TaskInstance (issuing a FOR UPDATE clause) until the
            session is committed.
        """
        _refresh_from_db(task_instance=self, session=session, lock_for_update=lock_for_update)
    def refresh_from_task(self, task: Operator, pool_override: str | None = None) -> None: