Only stop log parser if it's actually running
This commit is contained in:
parent
3cf573baf6
commit
9e806d30f9
|
@ -73,10 +73,11 @@ class DomainConsoleWatcherInstance(object):
|
||||||
|
|
||||||
# Stop execution thread
|
# Stop execution thread
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.logger.out('Stopping VM log parser', state='i', prefix='Domain {}:'.format(self.domuuid))
|
if self.thread and self.thread.isAlive():
|
||||||
self.thread_stopper.set()
|
self.logger.out('Stopping VM log parser', state='i', prefix='Domain {}:'.format(self.domuuid))
|
||||||
# Do one final flush
|
self.thread_stopper.set()
|
||||||
self.update()
|
# Do one final flush
|
||||||
|
self.update()
|
||||||
|
|
||||||
# Main entrypoint
|
# Main entrypoint
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in New Issue