@@ -112,6 +112,7 @@ class ProcessServer():
"""Register a function to be called while the server is idle"""
assert hasattr(function, '__call__')
self._idlefuns[function] = data
+ serverlog("Registering idle function %s" % str(function))
def run(self):
@@ -380,10 +381,12 @@ class ProcessServer():
try:
retval = function(self, data, False)
if isinstance(retval, idleFinish):
+ serverlog("Removing idle function %s at idleFinish" % str(function))
del self._idlefuns[function]
self.cooker.command.finishAsyncCommand(retval.msg)
nextsleep = None
if retval is False:
+ serverlog("Removing idle function %s" % str(function))
del self._idlefuns[function]
nextsleep = None
elif retval is True:
Add some logging to show when handlers are added/removed to allow a better idea of what the server code is doing from the server log file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/server/process.py | 3 +++ 1 file changed, 3 insertions(+)