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

Removed redis.

parent 11384846
......@@ -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
......
......@@ -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(
......
......@@ -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:
......
......@@ -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
}
......
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