mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Fix numerous issues with recent enhancements
The buffer age was not working as intended The fix to exit on error exited overly eagerly The log replay failed to report a third value if file did not exist.
This commit is contained in:
parent
f7fb9d6af2
commit
522280d6be
@ -85,7 +85,7 @@ def updatestatus(stateinfo={}):
|
||||
info.append(laststate['error'])
|
||||
if 'clientcount' in laststate and laststate['clientcount'] != 1:
|
||||
info.append('clients: %d' % laststate['clientcount'])
|
||||
if 'bufferage' in stateinfo:
|
||||
if 'bufferage' in stateinfo and stateinfo['bufferage'] is not None:
|
||||
laststate['showtime'] = time.time() - stateinfo['bufferage']
|
||||
if 'showtime' in laststate:
|
||||
showtime = laststate['showtime']
|
||||
@ -561,7 +561,7 @@ elif shellargs:
|
||||
command = " ".join(shellargs)
|
||||
do_command(command, netserver)
|
||||
quitconfetty(fullexit=True)
|
||||
while not doexit:
|
||||
while inconsole or not doexit:
|
||||
if inconsole:
|
||||
rdylist, _, _ = select.select(
|
||||
(sys.stdin, session.connection), (), (), 60)
|
||||
|
@ -479,7 +479,7 @@ class ConsoleSession(object):
|
||||
"""Get the age in seconds of the buffered data
|
||||
|
||||
Returns False if no data buffered yet"""
|
||||
self.conshdl.get_buffer_age()
|
||||
return self.conshdl.get_buffer_age()
|
||||
|
||||
def reopen(self):
|
||||
self.conshdl.reopen()
|
||||
|
@ -189,7 +189,7 @@ class Logger(object):
|
||||
textfile = open(self.textpath, mode='r')
|
||||
binfile = open(self.binpath, mode='r')
|
||||
except IOError:
|
||||
return '', 0
|
||||
return '', 0, 0
|
||||
fcntl.flock(binfile, fcntl.LOCK_SH)
|
||||
binfile.seek(0, 2)
|
||||
binidx = binfile.tell() - 16
|
||||
|
Loading…
Reference in New Issue
Block a user