'Start the http server and the cron thread then wait for a signal.
The first SIGINT or SIGTERM signal will initiate a graceful shutdown while
a second one if any will force an immediate exit.'

def run(self, preload=None, stop=False):

    self.start(stop=stop)
    rc = preload_registries(preload)
    if stop:
        self.stop()
        return rc
    try:
        while (self.quit_signals_received == 0):
            time.sleep(60)
    except KeyboardInterrupt:
        pass
    self.stop()
