summaryrefslogtreecommitdiff
path: root/sbhs_server/settings.py
diff options
context:
space:
mode:
authorcoderick142017-05-23 17:34:13 +0530
committercoderick142017-05-23 17:34:13 +0530
commit9a1614dfa9cd3df20710a2c36ee07ec8a988588b (patch)
treefe3eb9c07004893d4e5354e981504c4c38a1cec6 /sbhs_server/settings.py
parent1fa3368b4662163e6652d5524a0c75bd836705f9 (diff)
downloadSBHS-2018-Rpi-9a1614dfa9cd3df20710a2c36ee07ec8a988588b.tar.gz
SBHS-2018-Rpi-9a1614dfa9cd3df20710a2c36ee07ec8a988588b.tar.bz2
SBHS-2018-Rpi-9a1614dfa9cd3df20710a2c36ee07ec8a988588b.zip
Add script for server monitoring
Diffstat (limited to 'sbhs_server/settings.py')
-rw-r--r--sbhs_server/settings.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py
index b7ec8b7..15dc8ae 100644
--- a/sbhs_server/settings.py
+++ b/sbhs_server/settings.py
@@ -136,6 +136,7 @@ EMAIL_HOST = 'smtp.gmail.com' #'smtp-auth.iitb.ac.in'
EMAIL_PORT = 587 #25
EMAIL_HOST_USER = credentials.EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = credentials.EMAIL_HOST_PASSWORD
+ADMIN_EMAIL=credentials.ADMIN_EMAIL
# Static files (CSS, JavaScript, Images)
@@ -251,13 +252,13 @@ with open(os.path.join(BASE_DIR, 'map_machine_ids.txt')) as f:
for line in f:
try:
data = line.split("=")
- MID_PORT_MAP[int(data[0])]=data[1].strip()
brd = sbhs.Sbhs()
b = brd.connect(int(data[0]))
assert b == True
- key = int(brd.getMachineId())
+ key = int(brd.getMachineId())
assert key > 0
brd.reset_board()
+ MID_PORT_MAP[key]=data[1].strip()
boards[str(key)] = {"board": brd, "experiment_id": None}
except:
pass