Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
nomad-lab
nomad-FAIR
Commits
5c07233b
Commit
5c07233b
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Acks_late is now configurable.
parent
c10500fb
No related branches found
No related tags found
1 merge request
!34
Merged latest changes torwards 4.2.
Pipeline
#44713
passed
6 years ago
Stage: build
Stage: test
Stage: release
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/config.py
+3
-2
3 additions, 2 deletions
nomad/config.py
nomad/processing/base.py
+3
-1
3 additions, 1 deletion
nomad/processing/base.py
with
6 additions
and
3 deletions
nomad/config.py
+
3
−
2
View file @
5c07233b
...
@@ -30,7 +30,7 @@ FilesConfig = namedtuple(
...
@@ -30,7 +30,7 @@ FilesConfig = namedtuple(
'
FilesConfig
'
,
[
'
uploads_bucket
'
,
'
raw_bucket
'
,
'
archive_bucket
'
,
'
staging_bucket
'
,
'
public_bucket
'
])
'
FilesConfig
'
,
[
'
uploads_bucket
'
,
'
raw_bucket
'
,
'
archive_bucket
'
,
'
staging_bucket
'
,
'
public_bucket
'
])
"""
API independent configuration for the object storage.
"""
"""
API independent configuration for the object storage.
"""
CeleryConfig
=
namedtuple
(
'
Celery
'
,
[
'
broker_url
'
,
'
max_memory
'
,
'
timeout
'
])
CeleryConfig
=
namedtuple
(
'
Celery
'
,
[
'
broker_url
'
,
'
max_memory
'
,
'
timeout
'
,
'
acks_late
'
])
"""
Used to configure the RabbitMQ for celery.
"""
"""
Used to configure the RabbitMQ for celery.
"""
FSConfig
=
namedtuple
(
'
FSConfig
'
,
[
'
tmp
'
,
'
objects
'
,
'
nomad_tmp
'
])
FSConfig
=
namedtuple
(
'
FSConfig
'
,
[
'
tmp
'
,
'
objects
'
,
'
nomad_tmp
'
])
...
@@ -86,7 +86,8 @@ def get_loglevel_from_env(key, default_level=logging.INFO):
...
@@ -86,7 +86,8 @@ def get_loglevel_from_env(key, default_level=logging.INFO):
celery
=
CeleryConfig
(
celery
=
CeleryConfig
(
broker_url
=
rabbit_url
,
broker_url
=
rabbit_url
,
max_memory
=
int
(
os
.
environ
.
get
(
'
NOMAD_CELERY_MAXMEMORY
'
,
64e6
)),
# 64 GB
max_memory
=
int
(
os
.
environ
.
get
(
'
NOMAD_CELERY_MAXMEMORY
'
,
64e6
)),
# 64 GB
timeout
=
int
(
os
.
environ
.
get
(
'
NOMAD_CELERY_TIMEOUT
'
,
3
*
3600
))
# 3h
timeout
=
int
(
os
.
environ
.
get
(
'
NOMAD_CELERY_TIMEOUT
'
,
3
*
3600
)),
# 3h
acks_late
=
bool
(
os
.
environ
.
get
(
'
NOMAD_CELERY_ACKS_LATE
'
,
True
))
)
)
fs
=
FSConfig
(
fs
=
FSConfig
(
...
...
This diff is collapsed.
Click to expand it.
nomad/processing/base.py
+
3
−
1
View file @
5c07233b
...
@@ -401,7 +401,9 @@ def unwarp_task(task, cls_name, self_id, *args, **kwargs):
...
@@ -401,7 +401,9 @@ def unwarp_task(task, cls_name, self_id, *args, **kwargs):
return
self
return
self
@app.task
(
bind
=
True
,
base
=
NomadCeleryTask
,
ignore_results
=
True
,
max_retries
=
3
,
acks_late
=
True
)
@app.task
(
bind
=
True
,
base
=
NomadCeleryTask
,
ignore_results
=
True
,
max_retries
=
3
,
acks_late
=
config
.
celery
.
acks_late
)
def
proc_task
(
task
,
cls_name
,
self_id
,
func_attr
):
def
proc_task
(
task
,
cls_name
,
self_id
,
func_attr
):
"""
"""
The celery task that is used to execute async process functions.
The celery task that is used to execute async process functions.
...
...
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