Fixed an issue where CPU usage was very high on Windows when opening the psql tool. #8864
parent
559c6cfa65
commit
829d6323b8
|
|
@ -235,7 +235,7 @@ def read_stdout(process, sid, max_read_bytes, win_emit_output=True):
|
|||
'error': False},
|
||||
namespace='/pty', room=sid)
|
||||
|
||||
sio.sleep(0)
|
||||
sio.sleep(0.01)
|
||||
|
||||
|
||||
def windows_platform(connection_data, sid, max_read_bytes, server_id):
|
||||
|
|
@ -246,10 +246,11 @@ def windows_platform(connection_data, sid, max_read_bytes, server_id):
|
|||
process.write("\r\n")
|
||||
app.config['sessions'][request.sid] = process
|
||||
pdata[request.sid] = process
|
||||
cdata[request.sid] = process.fd
|
||||
open_psql_connections[request.sid] = server_id
|
||||
set_term_size(process, 50, 50)
|
||||
|
||||
while True:
|
||||
while process.isalive():
|
||||
read_stdout(process, sid, max_read_bytes,
|
||||
win_emit_output=True)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue