Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Use transformer config for tasks
Browse files Browse the repository at this point in the history
Although there's an implicit dependency on backdrop.write's config (they
must be configured to use the same AMQP URL), it's too fragile to
depend on config deployed by a different fabric task.

We specify config both in tasks and the worker so that they can be more
easily split in future.
  • Loading branch information
mattrco committed Dec 8, 2014
1 parent 0efb380 commit 8598f7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backdrop/transformers/tasks.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from celery import Celery

# Load the appropriate config from backdrop.write
# Load the appropriate config as a python module
import importlib
from os import getenv

GOVUK_ENV = getenv("GOVUK_ENV", "development")
config = importlib.import_module(
"backdrop.write.config.{}".format(GOVUK_ENV))
"backdrop.transformers.config.{}".format(GOVUK_ENV))

app = Celery(
'transformations',
Expand Down

0 comments on commit 8598f7d

Please sign in to comment.