Pause an experiment and remove costly resources.

def hibernate(app):
    """Pause an experiment and remove costly resources."""
    backup(app)

    log("Scaling down the web servers...")
    subprocess.call("heroku ps:scale web=0" + " --app " + app, shell=True)
    subprocess.call("heroku ps:scale worker=0" + " --app " + app, shell=True)
    subprocess.call("heroku ps:scale clock=0" + " --app " + app, shell=True)

    log("Removing addons...")
    addons = [
        "heroku-postgresql",
        # "papertrail",
        "rediscloud",
    ]
    for addon in addons:
        subprocess.call(
            "heroku addons:destroy {} --app {} --confirm {}".format(
                addon,
                app,
                app
            ),
            shell=True,
        )