

def _start(app_id, instances, force):
    'Start a Marathon application.\n\n    :param app_id: the id for the application\n    :type app_id: str\n    :param instances: the number of instances to start\n    :type instances: str\n    :param force: whether to override running deployments\n    :type force: bool\n    :returns: process return code\n    :rtype: int\n    '
    client = marathon.create_client()
    desc = client.get_app(app_id)
    if (desc['instances'] > 0):
        emitter.publish('Application {!r} already started: {!r} instances.'.format(app_id, desc['instances']))
        return 1
    app_json = {
        'id': deployment,
    }
    if (instances is None):
        instances = 1
    else:
        instances = util.parse_int(instances)
        if (instances <= 0):
            emitter.publish('The number of instances must be positive: {!r}.'.format(instances))
            return 1
    app_json['instances'] = instances
    deployment = client.update_app(app_id, app_json, force)
    emitter.publish('Created deployment {}'.format(deployment))
    return 0

dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py _start/VarMisuse@72/236 `app_id`->`deployment`