Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Db v2 #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Db v2 #42

wants to merge 2 commits into from

Conversation

adi611
Copy link
Owner

@adi611 adi611 commented Oct 2, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

}
dashboard_server.update_workflow(self.workflow_id, data)
else:
print("Warning: dashboard_server does not have update_workflow method")

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    @property
    def status(self):
        if not hasattr(self, 'output_'):
            return 'created'
        if self.errored:
            return 'failed'
        if hasattr(self, 'result') and self.result() is not None:
            return 'completed'
        return 'running'
    
    def get_status_info(self):
        status = self.status
        info = {'status': status}
        
        if status == 'failed':
            info['error'] = self._get_error_info()
        elif status == 'completed':
            info['result'] = str(self.result())
        
        return info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant