mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-23 20:10:29 +03:00
Encapsulate settings as a class. Make a singleton available.
This commit is contained in:
parent
074f24bc52
commit
da426c1d89
@ -10,7 +10,7 @@ import urlparse
|
||||
import zlib
|
||||
import zmq.green as zmq
|
||||
from datetime import datetime
|
||||
from eddn.conf import Settings
|
||||
from eddn.conf.Settings import Settings
|
||||
from eddn.Validator import Validator, ValidationSeverity
|
||||
|
||||
from gevent import monkey
|
||||
|
@ -13,7 +13,7 @@ import gevent
|
||||
import simplejson
|
||||
import zmq.green as zmq
|
||||
from bottle import get, run as bottle_run
|
||||
from eddn.conf import Settings
|
||||
from eddn.conf.Settings import Settings
|
||||
|
||||
from gevent import monkey
|
||||
monkey.patch_all()
|
||||
|
@ -6,28 +6,32 @@ Created on 15 Nov 2014
|
||||
|
||||
from eddn import __version__ as version
|
||||
|
||||
EDDN_VERSION = version
|
||||
|
||||
class _Settings(object):
|
||||
|
||||
###############################################################################
|
||||
# Relay settings
|
||||
###############################################################################
|
||||
EDDN_VERSION = version
|
||||
|
||||
RELAY_RECEIVER_BINDINGS = ["tcp://localhost:8500"]
|
||||
###############################################################################
|
||||
# Relay settings
|
||||
###############################################################################
|
||||
|
||||
RELAY_SENDER_BINDINGS = ["tcp://*:9500"]
|
||||
RELAY_RECEIVER_BINDINGS = ["tcp://localhost:8500"]
|
||||
|
||||
RELAY_DECOMPRESS_MESSAGES = False
|
||||
RELAY_SENDER_BINDINGS = ["tcp://*:9500"]
|
||||
|
||||
###############################################################################
|
||||
# Gateway settings
|
||||
###############################################################################
|
||||
RELAY_DECOMPRESS_MESSAGES = False
|
||||
|
||||
GATEWAY_SENDER_BINDINGS = ["tcp://*:8500"]
|
||||
###############################################################################
|
||||
# Gateway settings
|
||||
###############################################################################
|
||||
|
||||
GATEWAY_IP_KEY_SALT = None
|
||||
GATEWAY_SENDER_BINDINGS = ["tcp://*:8500"]
|
||||
|
||||
GATEWAY_JSON_SCHEMAS = {
|
||||
"http://schemas.elite-markets.net/eddn/commodity/1": "../schemas/commodity-v0.1.json",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/1/test": "../schemas/commodity-v0.1.json"
|
||||
}
|
||||
GATEWAY_IP_KEY_SALT = None
|
||||
|
||||
GATEWAY_JSON_SCHEMAS = {
|
||||
"http://schemas.elite-markets.net/eddn/commodity/1": "../schemas/commodity-v0.1.json",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/1/test": "../schemas/commodity-v0.1.json"
|
||||
}
|
||||
|
||||
Settings = _Settings()
|
||||
|
Loading…
x
Reference in New Issue
Block a user