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