Merge branch 'master' into celery-spike

Conflicts:
	app/__init__.py
	app/notifications/rest.py
	config.py
	wsgi.py
This commit is contained in:
Martyn Inglis
2016-02-12 09:36:49 +00:00
26 changed files with 896 additions and 429 deletions

View File

@@ -14,9 +14,13 @@ class Config(object):
NOTIFY_DATA_API_AUTH_TOKEN = os.getenv('NOTIFY_API_TOKEN', "dev-token")
ADMIN_CLIENT_USER_NAME = None
ADMIN_CLIENT_SECRET = None
DELIVERY_CLIENT_USER_NAME = None
DELIVERY_CLIENT_SECRET = None
AWS_REGION = 'eu-west-1'
NOTIFY_JOB_QUEUE = os.getenv('NOTIFY_JOB_QUEUE', 'notify-jobs-queue')
# Notification Queue names are a combination of a prefx plus a name
NOTIFICATION_QUEUE_PREFIX = 'notification'
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
BROKER_TRANSPORT_OPTIONS = {
@@ -44,27 +48,32 @@ class Development(Config):
DANGEROUS_SALT = 'dangerous-salt'
ADMIN_CLIENT_USER_NAME = 'dev-notify-admin'
ADMIN_CLIENT_SECRET = 'dev-notify-secret-key'
DELIVERY_CLIENT_USER_NAME = 'dev-notify-delivery'
DELIVERY_CLIENT_SECRET = 'dev-notify-secret-key'
NOTIFICATION_QUEUE_PREFIX = 'notification_development'
class Test(Config):
DEBUG = True
class Test(Development):
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/test_notification_api'
SECRET_KEY = 'secret-key'
DANGEROUS_SALT = 'dangerous-salt'
ADMIN_CLIENT_USER_NAME = 'dev-notify-admin'
ADMIN_CLIENT_SECRET = 'dev-notify-secret-key'
NOTIFICATION_QUEUE_PREFIX = 'notification_test'
class Preview(Config):
NOTIFICATION_QUEUE_PREFIX = 'notification_preview'
class Staging(Config):
NOTIFICATION_QUEUE_PREFIX = 'notification_staging'
class Live(Config):
SECRET_KEY = 'secret-key'
DANGEROUS_SALT = 'dangerous-salt'
ADMIN_CLIENT_USER_NAME = 'dev-notify-admin'
ADMIN_CLIENT_SECRET = 'dev-notify-secret-key'
pass
NOTIFICATION_QUEUE_PREFIX = 'notification_live'
configs = {
'development': Development,
'preview': Preview,
'staging': Staging,
'test': Test,
'live': Live,
}