Skip to content

Conversation

@josenavas
Copy link
Contributor

This PR adds the necessary DB structure to support default workflows from plugins and user-generated workflows.

Overview of changes in this PR:

  • Structures added to the DB to support default workflows from plugins.
  • DefaultWorkflow object (and aux classes) added to access the default workflows.
  • Small table added to keep track of the user-generated workflow
  • Currently not implemented (will be in tomorrow): ProcessingWorkflow object to access the user defined workflows.
  • In order to implement the above class, we need to keep track of which artifacts have been generated from which ProcessingJob. This adds another table to the database and adds some work on job completion. This triggered changes in the ProcessingJob object, so more work is kept internally to the object rather than outside of the object, forcing to make changes in the restAPI handlers, restAPI interface and plugins (to meet the new requirements of the restAPI).

payload_success = payload['success']
if payload_success:
artifacts = payload['artifacts']
error = None
Copy link
Member

Choose a reason for hiding this comment

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

Should error be '' so we always return a string?

Copy link
Member

Choose a reason for hiding this comment

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

Ignore this, got confused with error_msg. However, error_msg will not be defined, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

error_msg is defined in line 171.

@antgonza
Copy link
Member

A few comments.

edges = [(nodes[s], nodes[d]) for s, d in edges]
g.add_edges_from(edges)
else:
# It is possible that there are no edges because we are still
Copy link
Member

Choose a reason for hiding this comment

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

One of this is missing a test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@antgonza
Copy link
Member

A few more comments.

@josenavas
Copy link
Contributor Author

@ElDeveloper and/or @mortonjt can you review this PR?

@antgonza antgonza changed the title WIP: Workflow object Workflow object Feb 19, 2016
processing_parameters=params)
job.status = 'success'
payload = loads(self.request.body)
try:
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind restricting the scope of this try block to just the line that might raise the exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@ElDeveloper
Copy link
Contributor

👍

@josenavas
Copy link
Contributor Author

Thanks! Comments addressed

antgonza added a commit that referenced this pull request Feb 23, 2016
@antgonza antgonza merged commit ffb2bec into qiita-spots:artifact-study-pages Feb 23, 2016
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.

3 participants