'Initializes the Job Handler Queue, creates (unstarted) monitoring thread'

def __init__(self, app, dispatcher):

    self.app = app
    self.dispatcher = dispatcher
    self.sa_session = app.model.context
    self.track_jobs_in_database = self.app.config.track_jobs_in_database
    self.__clear_job_count()
    self.parent_pid = os.getpid()
    self.queue = Queue()
    self.waiting_jobs = []
    self.job_wrappers = {}
    self.sleeper = Sleeper()
    self.running = True
    self.monitor_thread = threading.Thread(name='JobHandlerQueue.monitor_thread', target=self.__monitor)
    self.monitor_thread.setDaemon(True)
