def put(self, state, result):
        was_altered = False
        if state != self.state:
            self.state = state
            was_altered = True
        if state == states.REVERT_FAILURE:
            if self.revert_failure != result:
                self.revert_failure = result
                was_altered = True
            if not _is_all_none(self.results, self.revert_results):
                self.results = None
                self.revert_results = None
                was_altered = True
        elif state == states.FAILURE:
            if self.failure != result:
                self.failure = result
                was_altered = True
            if not _is_all_none(self.results, self.revert_results,
                                self.revert_failure):
                self.results = None
                self.revert_results = None
                self.revert_failure = None
                was_altered = True
        elif state == states.SUCCESS:
            if not _is_all_none(self.revert_results, self.revert_failure,
                                self.failure):
                self.revert_results = None
                self.revert_failure = None
                self.failure = None
                was_altered = True
            # 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 task detail always needs
            # to be saved if they are not exactly equivalent...
            if result is not self.results:
                self.results = result
                was_altered = True
        elif state == states.REVERTED:
            if not _is_all_none(self.revert_failure):
                self.revert_failure = None
                was_altered = True
            if result is not self.revert_results:
                self.revert_results = result
                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/TaskDetail.put