Revision a813a251 snf-cyclades-app/synnefo/logic/dispatcher.py

b/snf-cyclades-app/synnefo/logic/dispatcher.py
36 36
handled in the dispatched functions.
37 37

  
38 38
"""
39
from django.core.management import setup_environ
40 39

  
41 40
# Fix path to import synnefo settings
42 41
import sys
43 42
import os
44 43
path = os.path.normpath(os.path.join(os.getcwd(), '..'))
45 44
sys.path.append(path)
46
from synnefo import settings
47
setup_environ(settings)
45
from synnefo import settings as snf_settings
46
from django.conf import settings
47
settings.configure(**snf_settings.__dict__)
48 48

  
49 49
from django.db import close_connection
50 50

  
......
113 113
        self.client.connect()
114 114

  
115 115
        # Declare queues and exchanges
116
        exchange = settings.EXCHANGE_GANETI
116
        exchange = snf_settings.EXCHANGE_GANETI
117 117
        exchange_dl = queues.convert_exchange_to_dead(exchange)
118 118
        self.client.exchange_declare(exchange=exchange,
119 119
                                     type="topic")

Also available in: Unified diff