def main():
    try:
        _setup()

        collection_interval = cfg.CONF.garbagecollector.collection_interval
        garbage_collector = GarbageCollectorService(collection_interval=collection_interval)
        exit_code = garbage_collector.run()
    except __HOLE__ 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
dataset/ETHPy150Open StackStorm/st2/st2reactor/st2reactor/cmd/garbagecollector.py/main