Minor clean up of crash_gen output clutter
This commit is contained in:
parent
7a4c25f0b3
commit
eceae10473
|
@ -1656,7 +1656,8 @@ class TaskReadData(StateTransitionTask):
|
||||||
|
|
||||||
# 1 in 5 chance, simulate a broken connection, only if service stable (not restarting)
|
# 1 in 5 chance, simulate a broken connection, only if service stable (not restarting)
|
||||||
if random.randrange(20)==0: # and self._canRestartService(): # TODO: break connection in all situations
|
if random.randrange(20)==0: # and self._canRestartService(): # TODO: break connection in all situations
|
||||||
Logging.info("Attempting to reconnect to server") # TODO: change to DEBUG
|
# Logging.info("Attempting to reconnect to server") # TODO: change to DEBUG
|
||||||
|
Progress.emit(Progress.SERVICE_RECONNECT_START)
|
||||||
try:
|
try:
|
||||||
wt.getDbConn().close()
|
wt.getDbConn().close()
|
||||||
wt.getDbConn().open()
|
wt.getDbConn().open()
|
||||||
|
@ -1667,9 +1668,12 @@ class TaskReadData(StateTransitionTask):
|
||||||
if gSvcMgr.isRunning(): # may have race conditon, but low prob, due to
|
if gSvcMgr.isRunning(): # may have race conditon, but low prob, due to
|
||||||
Logging.error("Failed to reconnect when managed server is running")
|
Logging.error("Failed to reconnect when managed server is running")
|
||||||
raise # Not OK if we are running normally
|
raise # Not OK if we are running normally
|
||||||
Logging.info("Ignoring DB reconnect error")
|
|
||||||
|
|
||||||
print("_r", end="", flush=True)
|
Progress.emit(Progress.SERVICE_RECONNECT_FAILURE)
|
||||||
|
# Logging.info("Ignoring DB reconnect error")
|
||||||
|
|
||||||
|
# print("_r", end="", flush=True)
|
||||||
|
Progress.emit(Progress.SERVICE_RECONNECT_SUCCESS)
|
||||||
# The above might have taken a lot of time, service might be running
|
# The above might have taken a lot of time, service might be running
|
||||||
# by now, causing error below to be incorrectly handled due to timing issue
|
# by now, causing error below to be incorrectly handled due to timing issue
|
||||||
return # TODO: fix server restart status race condtion
|
return # TODO: fix server restart status race condtion
|
||||||
|
|
|
@ -163,11 +163,17 @@ class Progress:
|
||||||
BEGIN_THREAD_STEP = 1
|
BEGIN_THREAD_STEP = 1
|
||||||
END_THREAD_STEP = 2
|
END_THREAD_STEP = 2
|
||||||
SERVICE_HEART_BEAT= 3
|
SERVICE_HEART_BEAT= 3
|
||||||
|
SERVICE_RECONNECT_START = 4
|
||||||
|
SERVICE_RECONNECT_SUCCESS = 5
|
||||||
|
SERVICE_RECONNECT_FAILURE = 6
|
||||||
tokens = {
|
tokens = {
|
||||||
STEP_BOUNDARY: '.',
|
STEP_BOUNDARY: '.',
|
||||||
BEGIN_THREAD_STEP: '[',
|
BEGIN_THREAD_STEP: '[',
|
||||||
END_THREAD_STEP: '] ',
|
END_THREAD_STEP: '] ',
|
||||||
SERVICE_HEART_BEAT: '.Y.'
|
SERVICE_HEART_BEAT: '.Y.',
|
||||||
|
SERVICE_RECONNECT_START: '<r.',
|
||||||
|
SERVICE_RECONNECT_SUCCESS: '.r>',
|
||||||
|
SERVICE_RECONNECT_FAILURE: '.xr>',
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in New Issue