'Runs when the manager is done processing everything.'

def _shutdown(self):

    if self.ipc_server:
        self.ipc_server.shutdown()
    fire_event(u'manager.shutdown', self)
    if (not self.unit_test):
        log.debug(u'Shutting    down')
    self.engine.dispose()
    if self.options.test:
        if (u'test' not in self.db_filename):
            raise Exception(u'trying    to    delete    non    test    database?')
        if self._has_lock:
            os.remove(self.db_filename)
            log.info(u'Removed    test    database')
    global manager
    manager = None
