reanahub / reana-workflow-controller

REANA Workflow Controller
http://reana-workflow-controller.readthedocs.io/
MIT License
2 stars 38 forks source link

Refactor workflow statuses in rest.py #143

Open dinosk opened 6 years ago

dinosk commented 6 years ago

In rest.py there is a redefinition of the possible statuses of a workflow. The WorkflowStatus enum can be used instead.

dinosk commented 6 years ago

As a second improvement, the response of set_workflow_status is designed to return messages about a single workflow. In the case where status is deleted, it is possible that multiple workflows are modified which creates an issue with what to set in the response message. Therefore the response could be refactored to an array, containing an entry for each modified workflow. Stemming from https://github.com/reanahub/reana-workflow-controller/pull/141#discussion_r232276615