mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-07 10:53:04 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
131b36ac3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -53,3 +53,4 @@ docs/_build/
|
||||
# PyBuilder
|
||||
target/
|
||||
*.prices
|
||||
*.prices
|
||||
|
@ -189,7 +189,6 @@ class Monitor(Thread):
|
||||
else:
|
||||
message = message[0]
|
||||
|
||||
|
||||
if Settings.RELAY_DUPLICATE_MAX_MINUTES:
|
||||
if duplicateMessages.isDuplicated(message):
|
||||
schemaID = 'DUPLICATE MESSAGE'
|
||||
@ -214,7 +213,6 @@ class Monitor(Thread):
|
||||
c.execute('INSERT OR IGNORE INTO softwares (name, dateStats) VALUES (?, DATE("now", "utc"))', (softwareID, ))
|
||||
db.commit()
|
||||
|
||||
|
||||
# Update uploader count
|
||||
uploaderID = json['header']['uploaderID']
|
||||
|
||||
@ -224,7 +222,6 @@ class Monitor(Thread):
|
||||
c.execute('INSERT OR IGNORE INTO uploaders (name, dateStats) VALUES (?, DATE("now", "utc"))', (uploaderID, ))
|
||||
db.commit()
|
||||
|
||||
|
||||
# Update schemas count
|
||||
schemaID = json['$schemaRef']
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Relay(Thread):
|
||||
receiver = context.socket(zmq.SUB)
|
||||
|
||||
# Filters on topics or not...
|
||||
if Settings.RELAY_RECEIVE_ONLY_GATEWAY_EXTRA_JSON == True:
|
||||
if Settings.RELAY_RECEIVE_ONLY_GATEWAY_EXTRA_JSON is True:
|
||||
for schemaRef, schemaFile in Settings.GATEWAY_JSON_SCHEMAS.iteritems():
|
||||
receiver.setsockopt(zmq.SUBSCRIBE, schemaRef)
|
||||
for schemaRef, schemaFile in Settings.RELAY_EXTRA_JSON_SCHEMAS.iteritems():
|
||||
@ -57,7 +57,6 @@ class Relay(Thread):
|
||||
else:
|
||||
receiver.setsockopt(zmq.SUBSCRIBE, '')
|
||||
|
||||
|
||||
for binding in Settings.RELAY_RECEIVER_BINDINGS:
|
||||
# Relays bind upstream to an Announcer, or another Relay.
|
||||
receiver.connect(binding)
|
||||
|
@ -30,9 +30,7 @@ class _Settings(object):
|
||||
# If set to false, don't listen to topic and accept all incoming messages
|
||||
RELAY_RECEIVE_ONLY_GATEWAY_EXTRA_JSON = True
|
||||
|
||||
RELAY_EXTRA_JSON_SCHEMAS = {
|
||||
|
||||
}
|
||||
RELAY_EXTRA_JSON_SCHEMAS = {}
|
||||
|
||||
###############################################################################
|
||||
# Gateway settings
|
||||
@ -63,7 +61,6 @@ class _Settings(object):
|
||||
MONITOR_DECOMPRESS_MESSAGES = True
|
||||
|
||||
|
||||
|
||||
def loadFrom(self, fileName):
|
||||
f = open(fileName, 'r')
|
||||
conf = simplejson.load(f)
|
||||
|
Loading…
x
Reference in New Issue
Block a user