def put(self, state, result):
        # Do not clean retry history (only on reset does this happen).
        was_altered = False
        if state != self.state:
            self.state = state
            was_altered = True
        if state == states.REVERT_FAILURE:
            if result != self.revert_failure:
                self.revert_failure = result
                was_altered = True
            if not _is_all_none(self.revert_results):
                self.revert_results = None
                was_altered = True
        elif state == states.FAILURE:
            if result != self.failure:
                self.failure = result
                was_altered = True
            if not _is_all_none(self.revert_results, self.revert_failure):
                self.revert_results = None
                self.revert_failure = None
                was_altered = True
        elif state == states.SUCCESS:
            if not _is_all_none(self.failure, self.revert_failure,
                                self.revert_results):
                self.failure = None
                self.revert_failure = None
                self.revert_results = None
            # Track what we produced, so that we can examine it (or avoid
            # using it again).
            self.results.append((result, {}))
            was_altered = True
        elif state == states.REVERTED:
            # We don't really have the ability to determine equality of
            # task (user) results at the current time, without making
            # potentially bad guesses, so assume the retry detail always needs
            # to be saved if they are not exactly equivalent...
            if result is not self.revert_results:
                self.revert_results = result
                was_altered = True
            if not _is_all_none(self.revert_failure):
                self.revert_failure = None
                was_altered = True
        return was_altered
Puts a result (acquired in the given state) into this detail.
dataset/ETHPy150Open openstack/taskflow/taskflow/persistence/models.py/RetryDetail.put