def _close_app(app, mongo_client, client, lis_outcome_manager):
    """ Ensures that the app is properly closed """
    app.stop()
    lis_outcome_manager.stop()
    client.close()
    mongo_client.close()
