add debug for peer locations

This commit is contained in:
KF7EEL 2021-12-08 16:28:40 -08:00
parent bd00e26212
commit 4ca24bd735
1 changed files with 5 additions and 0 deletions

View File

@ -885,6 +885,10 @@ def hbnet_web_service():
</i> </i>
""", icon=folium.Icon(color="blue", icon="record"), tooltip='<strong>' + i.callsign + '</strong>').add_to(f_map) """, icon=folium.Icon(color="blue", icon="record"), tooltip='<strong>' + i.callsign + '</strong>').add_to(f_map)
for l in peer_l: for l in peer_l:
## print(time.time() - l.time().total_seconds() > 3600 )
## print(datetime.datetime.now() - timedelta(days = 2))
## if datetime.datetime.now() - timedelta(days = 2) > timedelta(days = 2):
## print('greater')
## folium.Marker([float(l[1][1]), float(l[1][2])], popup=''' ## folium.Marker([float(l[1][1]), float(l[1][2])], popup='''
##<div class="panel panel-default"> ##<div class="panel panel-default">
## <div class="panel-heading" style="text-align: center;"><h4>''' + l[1][0] + '''</h4></div> ## <div class="panel-heading" style="text-align: center;"><h4>''' + l[1][0] + '''</h4></div>
@ -3257,6 +3261,7 @@ Name: <strong>''' + p.name + '''</strong>&nbsp; -&nbsp; Port: <strong>''' + str(
_peer_loc = PeerLoc.query.filter_by(dmr_id=_dmr_id).first() _peer_loc = PeerLoc.query.filter_by(dmr_id=_dmr_id).first()
db.session.delete(_peer_loc) db.session.delete(_peer_loc)
db.session.commit() db.session.commit()
print('deleted peer location')
except: except:
print('Peer not in DB') print('Peer not in DB')
pass pass