Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-qtl-db
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cc-qtl
cc-qtl-db
Commits
0a5335d0
Commit
0a5335d0
authored
3 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Add workflow invocation status
parent
e4f1fdea
No related branches found
No related tags found
1 merge request
!74
Resolve "select workflow to run"
Pipeline
#66456
canceled
3 years ago
Stage: test
Stage: docker-build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/api/models.py
+24
-7
24 additions, 7 deletions
server/api/models.py
with
24 additions
and
7 deletions
server/api/models.py
+
24
−
7
View file @
0a5335d0
...
...
@@ -30,7 +30,7 @@ from .managers import (
PhenotypeCategoryManager
,
)
from
.galaxy
import
GalaxyRunner
,
get_history_status
from
.galaxy
import
GalaxyRunner
,
get_history_status
,
get_workflow_invocation_status
from
.exceptions
import
RessourceAlreadyExists
# Create your models here.
...
...
@@ -161,7 +161,9 @@ class Experiment(models.Model):
Line_F
=
models
.
F
(
"
experiment_cc_line__cc_line_f__id_cc
"
),
Sex
=
models
.
F
(
"
experiment_cc_line__sex
"
),
)
.
values
(
"
id
"
,
"
CC_ID
"
,
"
value
"
,
"
phenotype_type
"
,
"
Line_M
"
,
"
Line_F
"
,
"
Sex
"
,)
.
values
(
"
id
"
,
"
CC_ID
"
,
"
value
"
,
"
phenotype_type
"
,
"
Line_M
"
,
"
Line_F
"
,
"
Sex
"
,
)
)
df_phenotypes
=
pd
.
DataFrame
(
data
=
phenotypes
)
...
...
@@ -639,14 +641,29 @@ class Analysis(models.Model):
@property
def
history_status
(
self
):
try
:
history_status
=
get_history_status
(
self
.
galaxy_history_id
)
return
history_status
except
ConnectionError
:
if
self
.
galaxy_history_id
:
try
:
history_status
=
get_history_status
(
self
.
galaxy_history_id
)
return
history_status
except
ConnectionError
:
return
None
else
:
return
None
def
get_workflow_job_params
(
self
):
@property
def
workflow_invocation_status
(
self
):
if
self
.
galaxy_workflow_invocation_id
:
try
:
status
=
get_workflow_invocation_status
(
self
.
galaxy_workflow_id
,
self
.
galaxy_workflow_invocation_id
)
return
status
except
ConnectionError
:
return
None
else
:
return
None
def
get_workflow_job_params
(
self
):
runner
=
GalaxyRunner
()
gi
=
runner
.
galaxy_instance
invocation
=
gi
.
workflows
.
show_invocation
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment