Skip to content

Commit

Permalink
Switches to merging config strategy and bumps yamlconf requirement to…
Browse files Browse the repository at this point in the history
… 0.1.0
  • Loading branch information
halfak committed Dec 18, 2015
1 parent 56d5047 commit 9f3546f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions ores.wmflabs.org.yaml → config/00-main.yaml
Expand Up @@ -11,7 +11,8 @@ ores:
score_caches:
ores_redis:
class: ores.score_caches.Redis
host: ores-redis
host: ores-redis-01
port: 6380
prefix: "ores"
socket_timeout: 15

Expand Down Expand Up @@ -48,9 +49,9 @@ score_processors:
- wikidatawiki
ores_celery:
class: ores.score_processors.Celery
BROKER_URL: redis://ores-redis
BROKER_URL: redis://ores-redis-01:6379
BROKER_TRANSPORT_OPTIONS: {'socket_timeout': 15} # seconds
CELERY_RESULT_BACKEND: redis://ores-redis
CELERY_RESULT_BACKEND: redis://ores-redis-01:6379
CELERY_ACCEPT_CONTENT: ['pickle']
CELERY_TASK_SERIALIZER: 'pickle'
CELERY_RESULT_SERIALIZER: 'pickle'
Expand Down
5 changes: 3 additions & 2 deletions ores_celery.py
@@ -1,12 +1,13 @@
#!/usr/bin/env python3
import glob
import logging
import logging.config

import yamlconf

from ores.score_processors import Celery

with open("ores.wmflabs.org.yaml") as f:
config = yamlconf.load(f)
config = yamlconf.load(*(open(p) for p in glob.glob("config/*.yaml")))

with open("logging_config.yaml") as f:
logging_config = yamlconf.load(f)
Expand Down
4 changes: 2 additions & 2 deletions ores_wsgi.py
@@ -1,13 +1,13 @@
#!/usr/bin/env python3
import glob
import logging
import logging.config

import yamlconf

from ores.wsgi import server

with open("ores.wmflabs.org.yaml") as f:
config = yamlconf.load(f)
config = yamlconf.load(*(open(p) for p in glob.glob("config/*.yaml")))

with open("logging_config.yaml") as f:
logging_config = yamlconf.load(f)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -2,5 +2,6 @@ editquality >= 0.2.1
ores >= 0.5.7
redis
statsd
yamlconf >= 0.1.0
wb-vandalism >= 0.1.6
wikiclass >= 0.2.1

0 comments on commit 9f3546f

Please sign in to comment.