mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-20 16:53:54 +03:00
Add a gateway timestamp to the message (e.g. time of receipt by EDDN,
not time of generation of market data).
This commit is contained in:
parent
8845cdca80
commit
56853854ca
@ -9,6 +9,7 @@ import simplejson
|
||||
import urlparse
|
||||
import zlib
|
||||
import zmq.green as zmq
|
||||
from datetime import datetime
|
||||
from eddn import __version__ as EDDN_VERSION
|
||||
from eddn.conf import Settings
|
||||
from eddn.Validator import Validator, ValidationSeverity
|
||||
@ -119,6 +120,8 @@ def parse_and_error_handle(data):
|
||||
|
||||
if validationResults.severity <= ValidationSeverity.WARN:
|
||||
|
||||
parsed_message['header']['gatewayTimestamp'] = datetime.now().isoformat()
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user