rev324, Store and display peers last found time, Fix UiPassword plugin cleanup bug, Experimental option to use tempfiles when downloading, Experimental option to stream files out of msgpack context, FileRequest streamFile command, Cleanup peers if not found for 4 hours, Don't reopen openssl in every 5min, Peer fileGet benchmark option
This commit is contained in:
parent
a93ca2c3b4
commit
d331eea384
12 changed files with 233 additions and 171 deletions
|
@ -116,7 +116,7 @@ class UiRequestPlugin(object):
|
|||
# Sites
|
||||
yield "<br><br><b>Sites</b>:"
|
||||
yield "<table>"
|
||||
yield "<tr><th>address</th> <th>connected</th> <th>peers</th> <th>content.json</th> </tr>"
|
||||
yield "<tr><th>address</th> <th>connected</th> <th title='connected/good/total'>peers</th> <th>content.json</th> </tr>"
|
||||
for site in self.server.sites.values():
|
||||
yield self.formatTableRow([
|
||||
(
|
||||
|
@ -133,7 +133,15 @@ class UiRequestPlugin(object):
|
|||
])
|
||||
yield "<tr><td id='peers_%s' style='display: none; white-space: pre'>" % site.address
|
||||
for key, peer in site.peers.items():
|
||||
yield "(%s, err: %s) %22s -<br>" % (peer.connection, peer.connection_error, key)
|
||||
if peer.last_found:
|
||||
last_found = int(time.time()-peer.last_found)/60
|
||||
else:
|
||||
last_found = "--"
|
||||
if peer.connection:
|
||||
connection_id = peer.connection.id
|
||||
else:
|
||||
connection_id = None
|
||||
yield "(#%s, err: %s, found: %s min ago) %22s -<br>" % (connection_id, peer.connection_error, last_found, key)
|
||||
yield "<br></td></tr>"
|
||||
yield "</table>"
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ class UiRequestPlugin(object):
|
|||
|
||||
@classmethod
|
||||
def cleanup(cls):
|
||||
cls.last_cleanup = time.time()
|
||||
for session_id, session in cls.sessions.items():
|
||||
if session["keep"] and time.time() - session["added"] > 60 * 60 * 24 * 60: # Max 60days for keep sessions
|
||||
del(cls.sessions[session_id])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue