mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-15 23:02:05 +03:00
commit
f12c936d08
@ -37,11 +37,6 @@ statsCollector = StatsCollector()
|
||||
statsCollector.start()
|
||||
|
||||
|
||||
# Migration from schemas.elite-markets.net to eddn.edcd.io - Remove after transition complete!
|
||||
import re
|
||||
TRANSITION_RE = re.compile('^https://eddn.edcd.io/schemas/(.+)')
|
||||
|
||||
|
||||
def configure():
|
||||
# Get the list of transports to bind from settings. This allows us to PUB
|
||||
# messages to multiple announcers over a variety of socket types
|
||||
@ -150,11 +145,6 @@ def parse_and_error_handle(data):
|
||||
if validationResults.severity <= ValidationSeverity.WARN:
|
||||
parsed_message['header']['gatewayTimestamp'] = datetime.utcnow().isoformat() + 'Z'
|
||||
|
||||
# Migration from schemas.elite-markets.net to eddn.edcd.io - Remove after transition complete!
|
||||
match = TRANSITION_RE.match(parsed_message['$schemaRef'])
|
||||
if match and match.group(1):
|
||||
parsed_message['$schemaRef'] = 'http://schemas.elite-markets.net/eddn/%s' % match.group(1)
|
||||
|
||||
ip_hash_salt = Settings.GATEWAY_IP_KEY_SALT
|
||||
if ip_hash_salt:
|
||||
# If an IP hash is set, salt+hash the uploader's IP address and set
|
||||
|
@ -49,28 +49,18 @@ class _Settings(object):
|
||||
GATEWAY_IP_KEY_SALT = None
|
||||
|
||||
GATEWAY_JSON_SCHEMAS = {
|
||||
"http://schemas.elite-markets.net/eddn/commodity/3" : "schemas/commodity-v3.0.json",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/3/test" : "schemas/commodity-v3.0.json",
|
||||
"https://eddn.edcd.io/schemas/commodity/3" : "schemas/commodity-v3.0.json",
|
||||
"https://eddn.edcd.io/schemas/commodity/3/test" : "schemas/commodity-v3.0.json",
|
||||
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/2" : "schemas/shipyard-v2.0.json",
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/2/test" : "schemas/shipyard-v2.0.json",
|
||||
"https://eddn.edcd.io/schemas/shipyard/2" : "schemas/shipyard-v2.0.json",
|
||||
"https://eddn.edcd.io/schemas/shipyard/2/test" : "schemas/shipyard-v2.0.json",
|
||||
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/2" : "schemas/outfitting-v2.0.json",
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/2/test" : "schemas/outfitting-v2.0.json",
|
||||
"https://eddn.edcd.io/schemas/outfitting/2" : "schemas/outfitting-v2.0.json",
|
||||
"https://eddn.edcd.io/schemas/outfitting/2/test" : "schemas/outfitting-v2.0.json",
|
||||
|
||||
"http://schemas.elite-markets.net/eddn/blackmarket/1" : "schemas/blackmarket-v1.0.json",
|
||||
"http://schemas.elite-markets.net/eddn/blackmarket/1/test" : "schemas/blackmarket-v1.0.json",
|
||||
"https://eddn.edcd.io/schemas/blackmarket/1" : "schemas/blackmarket-v1.0.json",
|
||||
"https://eddn.edcd.io/schemas/blackmarket/1/test" : "schemas/blackmarket-v1.0.json",
|
||||
|
||||
"http://schemas.elite-markets.net/eddn/journal/1" : "schemas/journal-v1.0.json",
|
||||
"http://schemas.elite-markets.net/eddn/journal/1/test" : "schemas/journal-v1.0.json",
|
||||
"https://eddn.edcd.io/schemas/journal/1" : "schemas/journal-v1.0.json",
|
||||
"https://eddn.edcd.io/schemas/journal/1/test" : "schemas/journal-v1.0.json",
|
||||
}
|
||||
@ -80,10 +70,20 @@ class _Settings(object):
|
||||
"http://schemas.elite-markets.net/eddn/commodity/1/test",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/2",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/2/test",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/3",
|
||||
"http://schemas.elite-markets.net/eddn/commodity/3/test",
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/1",
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/1/test",
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/2",
|
||||
"http://schemas.elite-markets.net/eddn/outfitting/2/test",
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/1",
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/1/test",
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/2",
|
||||
"http://schemas.elite-markets.net/eddn/shipyard/2/test",
|
||||
"http://schemas.elite-markets.net/eddn/blackmarket/1",
|
||||
"http://schemas.elite-markets.net/eddn/blackmarket/1/test",
|
||||
"http://schemas.elite-markets.net/eddn/journal/1",
|
||||
"http://schemas.elite-markets.net/eddn/journal/1/test",
|
||||
]
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user