Clean up imports

Make several imports more specific to reduce redundant code imports and
improve memory utilization.
This commit is contained in:
2020-08-11 11:46:41 -04:00
parent 46ffe352e3
commit 0e5c681ada
11 changed files with 37 additions and 55 deletions

View File

@ -21,17 +21,13 @@
###############################################################################
import os
import sys
import uuid
import time
import threading
import libvirt
from threading import Thread, Event
from collections import deque
import fcntl
import signal
import pvcnoded.log as log
import pvcnoded.zkhandler as zkhandler
@ -62,12 +58,12 @@ class VMConsoleWatcherInstance(object):
# Thread options
self.thread = None
self.thread_stopper = threading.Event()
self.thread_stopper = Event()
# Start execution thread
def start(self):
self.thread_stopper.clear()
self.thread = threading.Thread(target=self.run, args=(), kwargs={})
self.thread = Thread(target=self.run, args=(), kwargs={})
self.logger.out('Starting VM log parser', state='i', prefix='Domain {}:'.format(self.domuuid))
self.thread.start()