Fix validate-all

This commit is contained in:
Dan 2022-02-18 11:40:58 -05:00
parent e91be2a54d
commit 779ac38513
1 changed files with 5 additions and 5 deletions

View File

@ -132,7 +132,7 @@ def validate_all(study_id, category=None, spec_id=None):
study = session.query(StudyModel).filter(StudyModel.id == study_id).first()
g.user = session.query(UserModel).filter(UserModel.uid == study.user_uid).first()
g.token = "anything_is_fine_just_need_something."
specs = WorkflowSpecService.get_specs()
specs = WorkflowSpecService().get_specs()
for spec in specs:
if spec_id and spec_id != spec.id:
continue
@ -145,11 +145,11 @@ def validate_all(study_id, category=None, spec_id=None):
print(f"Skipping {spec.id} in category {spec.category.display_name}, it is disabled for this study.")
else:
print(f"API Error {e.code}, validate workflow {spec.id} in Category {spec.category.display_name}")
return
continue
except WorkflowTaskExecException as e:
print(f"Workflow Error, {e}, in Task {e.task.name} validate workflow {spec.id} in Category {spec.category.display_name}")
return
continue
except Exception as e:
print(f"Unexpected Error, {e} validate workflow {spec.id} in Category {spec.category.display_name}")
print(f"Unexpected Error ({e.__class__.__name__}), {e} validate workflow {spec.id} in Category {spec.category.display_name}")
print(e)
return
continue