Commit d070ce10 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Removed redis.

parent 11384846
...@@ -54,22 +54,11 @@ services: ...@@ -54,22 +54,11 @@ services:
- RABBITMQ_DEFAULT_USER=rabbitmq - RABBITMQ_DEFAULT_USER=rabbitmq
- RABBITMQ_DEFAULT_PASS=rabbitmq - RABBITMQ_DEFAULT_PASS=rabbitmq
- RABBITMQ_DEFAULT_VHOST=/ - RABBITMQ_DEFAULT_VHOST=/
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log_levels [{default,debug}]
ports: ports:
- ${RABBITMQ_HOST_PORT}:5672 - ${RABBITMQ_HOST_PORT}:5672
volumes: volumes:
- nomadxt_rabbitmq:/var/lib/rabbitmq - 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 # the search engine
elastic: elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2 image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
......
...@@ -25,7 +25,7 @@ FilesConfig = namedtuple( ...@@ -25,7 +25,7 @@ FilesConfig = namedtuple(
'FilesConfig', ['uploads_bucket', 'repository_bucket', 'archive_bucket', 'compress_archive']) 'FilesConfig', ['uploads_bucket', 'repository_bucket', 'archive_bucket', 'compress_archive'])
""" API independent configuration for the object storage. """ """ 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. """ """ Used to configure the RabbitMQ and Redis backends for celery. """
MinioConfig = namedtuple('Minio', ['host', 'port', 'accesskey', 'secret']) MinioConfig = namedtuple('Minio', ['host', 'port', 'accesskey', 'secret'])
...@@ -63,9 +63,7 @@ rabbit_url = 'pyamqp://%s:%s@%s//' % (rabbit_user, rabbit_password, rabbit_host) ...@@ -63,9 +63,7 @@ rabbit_url = 'pyamqp://%s:%s@%s//' % (rabbit_user, rabbit_password, rabbit_host)
redis_url = 'redis://%s/0' % redis_host redis_url = 'redis://%s/0' % redis_host
celery = CeleryConfig( celery = CeleryConfig(
broker_url=rabbit_url, broker_url=rabbit_url
backend_url=redis_url,
serializer='pickle'
) )
minio = MinioConfig( minio = MinioConfig(
......
...@@ -47,16 +47,7 @@ if config.logstash.enabled: ...@@ -47,16 +47,7 @@ if config.logstash.enabled:
worker_process_init.connect(lambda **kwargs: mongo_connect()) worker_process_init.connect(lambda **kwargs: mongo_connect())
app = Celery( app = Celery('nomad.processing', broker=config.celery.broker_url)
'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,
))
# ensure elastic and mongo connections # ensure elastic and mongo connections
if 'sphinx' not in sys.modules: if 'sphinx' not in sys.modules:
......
...@@ -13,11 +13,7 @@ def celery_includes(): ...@@ -13,11 +13,7 @@ def celery_includes():
@pytest.fixture(scope='session') @pytest.fixture(scope='session')
def celery_config(): def celery_config():
return { return {
'broker_url': config.celery.broker_url, '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
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment