def reset(self) -> None:
        """Must be called every time the background task is finished.

        .. note::
            Must be called from async thread. Caller must hold lock on async executor when calling.
        """
        self.is_cancelled = False
        self.result = None
Must be called every time the background task is finished.

        .. note::
            Must be called from async thread. Caller must hold lock on async executor when calling.
        
patroni/async_executor.py