ignorelist

This commit is contained in:
SpudGunMan
2024-08-08 12:21:55 -07:00
parent 66ca1b4103
commit 66d44c3a6d
3 changed files with 7 additions and 2 deletions
+2
View File
@@ -47,6 +47,8 @@ SentryEnabled = True
SentryChannel = 9
# channel to send a message to when the watchdog is triggered
SentryHoldoff = 2
# list of ignored nodes numbers ex: 2813308004,4258675309
sentryIgnoreList =
[bbs]
enabled = True
+1
View File
@@ -78,6 +78,7 @@ try:
sentry_enabled = config['general'].getboolean('SentryEnabled', True) # default True
secure_channel = config['general'].getint('SentryChannel', 2) # default 2
sentry_holdoff = config['general'].getint('SentryHoldoff', 9) # default 9
sentryIgnoreList = config['general'].get('sentryIgnoreList', '').split(',')
config['general'].get('motd', MOTD)
urlTimeoutSeconds = config['general'].getint('URL_TIMEOUT', 10) # default 10 seconds
forecastDuration = config['general'].getint('NOAAforecastDuration', 4) # NOAA forcast days
+4 -2
View File
@@ -295,7 +295,8 @@ def get_closest_nodes(nodeInt=1):
b = longitudeValue - longitude
c = sqrt(a * a + b * b)
if (c < radius):
node_list.append({'id': nodeID, 'latitude': latitude, 'longitude': longitude})
if nodeID != myNodeNum1 and nodeID not in sentryIgnoreList:
node_list.append({'id': nodeID, 'latitude': latitude, 'longitude': longitude})
except Exception as e:
pass
# else:
@@ -326,7 +327,8 @@ def get_closest_nodes(nodeInt=1):
b = longitudeValue - longitude
c = sqrt(a * a + b * b)
if (c < radius):
node_list.append({'id': nodeID, 'latitude': latitude, 'longitude': longitude})
if nodeID != myNodeNum2 and nodeID not in sentryIgnoreList:
node_list.append({'id': nodeID, 'latitude': latitude, 'longitude': longitude})
except Exception as e:
pass