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
f4c89307
Commit
f4c89307
authored
2 years ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
ensure space is still ok when subtasks are about to start
parent
278396c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
chart/templates/deployment-celery-worker.yaml
+4
-0
4 additions, 0 deletions
chart/templates/deployment-celery-worker.yaml
jass/tasks.py
+8
-0
8 additions, 0 deletions
jass/tasks.py
with
12 additions
and
0 deletions
chart/templates/deployment-celery-worker.yaml
+
4
−
0
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"
...
...
This diff is collapsed.
Click to expand it.
jass/tasks.py
+
8
−
0
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
))
...
...
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