def main(): try: _setup() collection_interval = cfg.CONF.garbagecollector.collection_interval garbage_collector = GarbageCollectorService(collection_interval=collection_interval) exit_code = garbage_collector.run() except SystemExit as exit_code: return exit_code except: LOG.exception('(PID:%s) GarbageCollector quit due to exception.', os.getpid()) return FAILURE_EXIT_CODE finally: _teardown() return exit_code
def main(): try: _setup() collection_interval = cfg.CONF.garbagecollector.collection_interval garbage_collector = GarbageCollectorService( collection_interval=collection_interval) exit_code = garbage_collector.run() except SystemExit as exit_code: return exit_code except: LOG.exception('(PID:%s) GarbageCollector quit due to exception.', os.getpid()) return FAILURE_EXIT_CODE finally: _teardown() return exit_code
def main(): try: _setup() collection_interval = cfg.CONF.garbagecollector.collection_interval sleep_delay = cfg.CONF.garbagecollector.sleep_delay garbage_collector = GarbageCollectorService( collection_interval=collection_interval, sleep_delay=sleep_delay) exit_code = garbage_collector.run() except SystemExit as exit_code: deregister_service(GARBAGE_COLLECTOR) return exit_code except: LOG.exception("(PID:%s) GarbageCollector quit due to exception.", os.getpid()) return FAILURE_EXIT_CODE finally: _teardown() return exit_code