def app_loop(args, log):
    pulsar_app = _app(args, log)
    sleep = True
    while sleep:
        try:
            time.sleep(5)
        except __HOLE__:
            sleep = False
        except SystemExit:
            sleep = False
        except Exception:
            pass
    try:
        pulsar_app.shutdown()
    except Exception:
        log.exception("Failed to shutdown Pulsar application")
        raise
dataset/ETHPy150Open galaxyproject/pulsar/pulsar/main.py/app_loop