Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Statistical-Genetics
jass
Commits
f4c89307
Commit
f4c89307
authored
May 16, 2022
by
Bryan BRANCOTTE
Browse files
ensure space is still ok when subtasks are about to start
parent
278396c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
chart/templates/deployment-celery-worker.yaml
View file @
f4c89307
...
...
@@ -45,6 +45,10 @@ spec:
value
:
{{
printf "%s-rabbitmq" .Release.Name
}}
-
name
:
RABBITMQ_PORT
value
:
'
5672'
{{
- if .Values.projects.minSizeToKeepFree
}}
-
name
:
MIN_SIZE_TO_KEEP_IN_PROJECTS_DIR_IN_MB
value
:
'
{{
.Values.projects.minSizeToKeepFree
}}'
{{
- end
}}
command
:
-
"
celery"
-
"
-A"
...
...
jass/tasks.py
View file @
f4c89307
...
...
@@ -38,6 +38,11 @@ flask_app = Flask(__name__)
celery
=
make_celery
(
flask_app
)
@
celery
.
task
def
ensure_space_in_project_dir_task
(
project_id
):
ensure_space_in_project_dir
(
except_project_id
=
project_id
)
@
celery
.
task
def
create_project_worktable
(
project_id
):
project
=
GlobalProject
.
load
(
project_id
)
...
...
@@ -84,6 +89,9 @@ def run_project_analysis_if_needed(project):
return
tasks
=
[]
post_worktable_tasks
=
[]
tasks
.
append
(
ensure_space_in_project_dir_task
.
si
(
project
.
id
))
if
not
os
.
path
.
exists
(
project
.
get_worktable_path
()):
tasks
.
append
(
create_project_worktable
.
si
(
project
.
id
))
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment