Settings#
MOMOTOR_BROKER
#
A dictionary with connection settings for the Momotor broker.
Example:
MOMOTOR_BROKER = {
'HOST': 'localhost',
'PORT': 50052,
'USE_SSL': True,
'API_KEY': 'momotor-api-key',
'API_SECRET': 'momotor-api-secret',
'TOKEN_STORE_CLASS': 'momotor.django.token_store.model.ModelTokenStore',
}
HOST
#
The dns name or ip address of the Momotor broker.
Default: localhost
PORT
#
The tcp port the Momotor broker is listening too. If not provided, defaults to 50051
if
USE_SSL
is False, otherwise 50052
USE_SSL
#
Indicates whether to use SSL when connecting to the broker. There are three possible values:
yes
indicates an SSL connection is required. The certificate provided by the broker will be validated.insecure
indicates an SSL connection is required, but the certificate will not be validated. Use this when the broker uses a self-signed certificate.no
indicates SSL should not be used (not recommended).
API_KEY
and API_SECRET
#
The key and secret to use to authenticate to the broker with.
TOKEN_STORE_CLASS
#
The token store class to use. See the Token Store section for more information.
Available token stores classes are:
Default: momotor.django.token_store.model.ModelTokenStore
INFO_MAX_AGE
#
Server info is cached for this time.
Default: 30
TOKEN_DATABASE_NAME
#
Only used when the TOKEN_STORE_CLASS
setting is set to
momotor.django.token_store.model.ModelTokenStore
.
Name of the database where the model to store the Momotor tokens is created. This refers to the name of the
database as defined in the default DATABASES
Django setting.
Default: default
TOKEN_CACHE_NAME
#
Only used when the TOKEN_STORE_CLASS
setting is set to
momotor.django.token_store.cache.CachedTokenStore
.
Name of the cache where tokens are stored. This refers to the name of the
cache as defined in the default CACHES
Django setting.
Default: default
TOKEN_KEY
#
Only used when the TOKEN_STORE_CLASS
setting is set to
momotor.django.token_store.cache.CachedTokenStore
.
Cache key for the tokens.
The key is formatted using the MOMOTOR_BROKER
dictionary, so any
value in the settings dictionary can be used to make the key unique.
Default: momotor-broker-auth-token-{[API_KEY]}