mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
fix profiler option in configd (check_reload_status)
This commit is contained in:
parent
639d099341
commit
9deebbfc1c
@ -80,8 +80,9 @@ if len(sys.argv) > 1 and 'console' in sys.argv[1:]:
|
||||
# (https://code.google.com/p/jrfonseca/wiki/Gprof2Dot)
|
||||
print ("...<ctrl><c> to stop profiling")
|
||||
profile = cProfile.Profile()
|
||||
profile.enable()
|
||||
profile.enable(subcalls=True)
|
||||
try:
|
||||
proc_handler.single_threaded = True
|
||||
proc_handler.run()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
@ -66,7 +66,8 @@ class Handler(object):
|
||||
"""
|
||||
self.socket_filename = socket_filename
|
||||
self.config_path = config_path
|
||||
self.simulation_mode =simulation_mode
|
||||
self.simulation_mode = simulation_mode
|
||||
self.single_threaded = False
|
||||
|
||||
def run(self):
|
||||
""" Run process handler
|
||||
@ -97,7 +98,13 @@ class Handler(object):
|
||||
client_address=client_address,
|
||||
action_handler=actHandler,
|
||||
simulation_mode=self.simulation_mode)
|
||||
cmd_thread.start()
|
||||
if self.single_threaded :
|
||||
# run single threaded
|
||||
cmd_thread.run()
|
||||
else:
|
||||
# rnu threaded
|
||||
cmd_thread.start()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
# exit on <ctrl><c>
|
||||
raise
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user