Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
d070ce10
Commit
d070ce10
authored
Sep 05, 2018
by
Markus Scheidgen
Browse files
Removed redis.
parent
11384846
Changes
4
Hide whitespace changes
Inline
Side-by-side
infrastructure/nomadxt/docker-compose.yml
View file @
d070ce10
...
...
@@ -54,22 +54,11 @@ services:
-
RABBITMQ_DEFAULT_USER=rabbitmq
-
RABBITMQ_DEFAULT_PASS=rabbitmq
-
RABBITMQ_DEFAULT_VHOST=/
-
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log_levels [{default,debug}]
ports
:
-
${RABBITMQ_HOST_PORT}:5672
volumes
:
-
nomadxt_rabbitmq:/var/lib/rabbitmq
# results backend for celery
redis
:
image
:
redis:3.0-alpine
container_name
:
nomadxt_redis
command
:
redis-server --appendonly yes
ports
:
-
${REDIS_HOST_PORT}:6379
volumes
:
-
nomadxt_redis:/data
# the search engine
elastic
:
image
:
docker.elastic.co/elasticsearch/elasticsearch:6.3.2
...
...
nomad/config.py
View file @
d070ce10
...
...
@@ -25,7 +25,7 @@ FilesConfig = namedtuple(
'FilesConfig'
,
[
'uploads_bucket'
,
'repository_bucket'
,
'archive_bucket'
,
'compress_archive'
])
""" API independent configuration for the object storage. """
CeleryConfig
=
namedtuple
(
'Celery'
,
[
'broker_url'
,
'backend_url'
,
'serializer'
])
CeleryConfig
=
namedtuple
(
'Celery'
,
[
'broker_url'
])
""" Used to configure the RabbitMQ and Redis backends for celery. """
MinioConfig
=
namedtuple
(
'Minio'
,
[
'host'
,
'port'
,
'accesskey'
,
'secret'
])
...
...
@@ -63,9 +63,7 @@ rabbit_url = 'pyamqp://%s:%s@%s//' % (rabbit_user, rabbit_password, rabbit_host)
redis_url
=
'redis://%s/0'
%
redis_host
celery
=
CeleryConfig
(
broker_url
=
rabbit_url
,
backend_url
=
redis_url
,
serializer
=
'pickle'
broker_url
=
rabbit_url
)
minio
=
MinioConfig
(
...
...
nomad/processing/base.py
View file @
d070ce10
...
...
@@ -47,16 +47,7 @@ if config.logstash.enabled:
worker_process_init
.
connect
(
lambda
**
kwargs
:
mongo_connect
())
app
=
Celery
(
'nomad.processing'
,
backend
=
config
.
celery
.
backend_url
,
broker
=
config
.
celery
.
broker_url
)
app
.
add_defaults
(
dict
(
accept_content
=
[
'json'
,
'pickle'
],
task_serializer
=
config
.
celery
.
serializer
,
result_serializer
=
config
.
celery
.
serializer
,
))
app
=
Celery
(
'nomad.processing'
,
broker
=
config
.
celery
.
broker_url
)
# ensure elastic and mongo connections
if
'sphinx'
not
in
sys
.
modules
:
...
...
tests/conftest.py
View file @
d070ce10
...
...
@@ -13,11 +13,7 @@ def celery_includes():
@
pytest
.
fixture
(
scope
=
'session'
)
def
celery_config
():
return
{
'broker_url'
:
config
.
celery
.
broker_url
,
'result_backend'
:
config
.
celery
.
backend_url
,
'accept_content'
:
[
'json'
,
'pickle'
],
'task_serializer'
:
config
.
celery
.
serializer
,
'result_serializer'
:
config
.
celery
.
serializer
'broker_url'
:
config
.
celery
.
broker_url
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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