819e822c8acb54a671653fa552e1f130ac92efc4,polyaxon/db/models/pipelines.py,OperationRun,on_success,#OperationRun#Any#,563

Before Change


        self.entity.set_status(status=OperationStatuses.FAILED, message=message)

    def on_success(self, message: str = None) -> None:
        self.entity.set_status(status=OperationStatuses.SUCCEEDED, message=message)

After Change


            self.save(update_fields=["status"])

    def on_success(self, message: str = None) -> None:
        if self.entity:
            self.entity.set_status(status=OperationStatuses.SUCCEEDED, message=message)
        else:
            self.status = OperationStatuses.SUCCEEDED
            self.save(update_fields=["status"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: polyaxon/polyaxon
Commit Name: 819e822c8acb54a671653fa552e1f130ac92efc4
Time: 2019-05-16
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/pipelines.py
Class Name: OperationRun
Method Name: on_success


Project Name: polyaxon/polyaxon
Commit Name: 819e822c8acb54a671653fa552e1f130ac92efc4
Time: 2019-05-16
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/pipelines.py
Class Name: OperationRun
Method Name: on_failure


Project Name: polyaxon/polyaxon
Commit Name: 819e822c8acb54a671653fa552e1f130ac92efc4
Time: 2019-05-16
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/pipelines.py
Class Name: OperationRun
Method Name: on_retry


Project Name: polyaxon/polyaxon
Commit Name: 819e822c8acb54a671653fa552e1f130ac92efc4
Time: 2019-05-16
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/pipelines.py
Class Name: OperationRun
Method Name: on_upstream_failed