(self)
Set task_status_json based on self.task_id if the task has failed
Set task_status_json based on self.task_id if the task has failed
Set task_status_json based on self . task_id if the task has failed
def save_task_status_json_if_failed(self):
        """
        Set task_status_json based on self.task_id if the task has failed
        """
        if self.task_status_json is None:
            # intentionally routing through method to prime local cache
            task_status_json = self.get_task_status_json()
            if task_status_json.state == STATES.failed:
                self.task_status_json = task_status_json
                self.save()
def save_task_status_json_if_failed ( self ) : if self . task_status_json is None : # intentionally routing through method to prime local cache task_status_json = self . get_task_status_json ( ) if task_status_json . state == STATES . failed : self . task_status_json = task_status_json self . save ( )