def _kill(app_id, scale, host):
    client = marathon.create_client()

    payload = client.kill_tasks(app_id, host=host, scale=scale)
    # If scale is provided, the API return a "deploymentResult"
    # https://github.com/mesosphere/marathon/blob/50366c8/src/main/scala/mesosphere/marathon/api/RestResource.scala#L34-L36
    if scale:
        emitter.publish("Started deployment: {}".format(payload))
    else:
        if 'tasks' in payload:
            emitter.publish('Killed tasks: {}'.format(payload['tasks']))
            if len(payload['tasks']) == 0:
                return 1
        else:
            emitter.publish('Killed tasks: []')
            return 1
    return 0
:param app_id: the id of the application
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py/_kill