Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/20#discussion_r87991883
  
    --- Diff: aria/workflows/core/task.py ---
    @@ -113,99 +142,100 @@ def update(self):
             self._update_fields = {}
             try:
                 yield
    -            task = self.context
    +            task = self.model_context
                 for key, value in self._update_fields.items():
                     setattr(task, key, value)
    -            self.context = task
    +            self.model_context = task
             finally:
                 self._update_fields = None
     
         @property
    -    def workflow_context(self):
    +    def model_context(self):
             """
    -        :return: the task's name
    +        Returns the task model in storage
    +        :return: task in storage
             """
    -        return self._workflow_ctx
    +        return self._workflow_context.model.task.get(self._task_id)
    +
    +    @model_context.setter
    +    def model_context(self, value):
    +        self._workflow_context.model.task.store(value)
     
         @property
         def context(self):
             """
    -        Returns the task model in storage
    -        :return: task in storage
    +        Contexts for the operation
    +        :return:
             """
    -        return self.workflow_context.model.task.get(self._task_id)
    -
    -    @context.setter
    -    def context(self, value):
    -        self.workflow_context.model.task.store(value)
    +        return self._ctx
     
         @property
         def status(self):
             """
             Returns the task status
             :return: task status
             """
    -        return self.context.status
    +        return self.model_context.status
     
         @status.setter
    +    @_locked
         def status(self, value):
    --- End diff --
    
    prefix _


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to