Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jass
Manage
Activity
Members
Labels
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Statistical-Genetics
jass
Commits
160d3250
Commit
160d3250
authored
2 years ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
show how many pipelines/job are queued and running
parent
941e4d29
No related branches found
No related tags found
1 merge request
!64
Show queue status
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/pages/projects/_id.vue
+15
-0
15 additions, 0 deletions
client/pages/projects/_id.vue
jass/server.py
+7
-2
7 additions, 2 deletions
jass/server.py
jass/tasks.py
+5
-0
5 additions, 0 deletions
jass/tasks.py
with
27 additions
and
2 deletions
client/pages/projects/_id.vue
+
15
−
0
View file @
160d3250
...
...
@@ -29,6 +29,13 @@
<strong
style=
"color:white; text-transform:capitalize;"
>
{{
progress
}}
%
</strong>
</v-progress-linear>
</v-col>
<v-col
class=
"text-subtitle-1 text-center"
cols=
"12"
v-if=
"(activeTask == 0) || (pendingTask != 0)"
>
Task:
{{
activeTask
}}
running and
{{
pendingTask
}}
pending.
</v-col>
</v-row>
<v-row
v-show=
"isready"
align=
"center"
>
...
...
@@ -297,6 +304,8 @@ export default {
isready
:
false
,
isready2
:
false
,
progress
:
0
,
activeTask
:
1
,
pendingTask
:
0
,
gencov
:
null
,
metadata
:{
"
nb_phenotypes
"
:
0
,
"
nb_snps
"
:
0
},
summary
:{
"
JASSSignif
"
:{
"
MinUnivNotSignif
"
:
0
,
"
MinUnivSignif
"
:
0
},
"
JASSNotSignif
"
:{
"
MinUnivNotSignif
"
:
0
,
"
MinUnivSignif
"
:
0
}},
...
...
@@ -562,6 +571,12 @@ methods:{
async
getStatus
(){
await
this
.
$axios
.
$get
(
'
/queue_status/
'
).
then
((
function
(
resultStatus
)
{
console
.
log
(
resultStatus
);
this
.
activeTask
=
resultStatus
.
active
;
this
.
pendingTask
=
resultStatus
.
reserved
;
}).
bind
(
this
));
await
this
.
$axios
.
$get
(
'
/projects/
'
+
this
.
project
.
id
).
then
((
async
function
(
result
)
{
console
.
log
(
result
.
status
.
worktable
);
...
...
This diff is collapsed.
Click to expand it.
jass/server.py
+
7
−
2
View file @
160d3250
...
...
@@ -6,14 +6,14 @@ from json import JSONDecodeError
from
pathlib
import
Path
from
typing
import
List
from
starlette.responses
import
RedirectResponse
from
starlette.responses
import
RedirectResponse
,
JSONResponse
from
jass
import
util
from
jass.config
import
config
from
jass.models.phenotype
import
Phenotype
,
get_available_phenotypes
,
PhenotypeIdList
from
jass.models.inittable
import
get_inittable_meta
from
jass.models.project
import
GlobalProject
,
load_project
as
project__load_project
from
jass.tasks
import
create_project
,
run_project_analysis_if_needed
from
jass.tasks
import
create_project
,
run_project_analysis_if_needed
,
get_queue_status
from
fastapi
import
FastAPI
,
HTTPException
from
fastapi.responses
import
Response
,
FileResponse
...
...
@@ -167,6 +167,11 @@ def get_manhattan(project_id: str, selected_chr: str, selected_region: str):
)
@app.get
(
"
/api/queue_status
"
)
def
project_detail
():
return
JSONResponse
(
get_queue_status
())
# @blp_inittable.route("")
...
...
This diff is collapsed.
Click to expand it.
jass/tasks.py
+
5
−
0
View file @
160d3250
...
...
@@ -79,6 +79,11 @@ def dummy_task():
print
(
"
This task to nothing, but help the chain to have a valid status
"
)
def
get_queue_status
():
inspect
=
celery
.
control
.
inspect
()
return
dict
((
k
,
len
(
list
(
getattr
(
inspect
,
k
)().
values
())[
0
]))
for
k
in
[
'
active
'
,
'
reserved
'
])
def
run_project_analysis_if_needed
(
project
):
if
project
.
has_computation_going_on
():
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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