def start_job(args, artifact, service, service_config, host, job_name,
    instance_id, start_script, http_url, **config_files):
  real_instance_id = get_real_instance_id(instance_id)
  host_id = get_host_id(service_config.jobs[job_name].hosts, host)
  task_id = get_task_id(service_config.jobs[job_name].hosts, host_id, instance_id)
  Log.print_info("Starting task %d of %s on %s(%d)" % (
    task_id, job_name, host, real_instance_id))
  supervisor_client = get_supervisor_client(host, service,
      service_config.cluster.name, job_name, instance_id)

  if not args.update_config:
    config_files = dict()
    start_script = ""

  if (service_config.cluster.package_name and service_config.cluster.revision
      and service_config.cluster.timestamp):
    message = supervisor_client.start(artifact,
        package_name=service_config.cluster.package_name,
        revision=service_config.cluster.revision,
        timestamp=service_config.cluster.timestamp,
        http_url=http_url, start_script=start_script,
        **config_files)
  elif args.update_package:
    message = supervisor_client.start(artifact, force_update=True,
        http_url=http_url, start_script=start_script, **config_files)
  else:
    message = supervisor_client.start(artifact, package_name=args.package_name,
        revision=args.revision, timestamp=args.timestamp, http_url=http_url,
        start_script=start_script, **config_files)
  if SUPERVISOR_SUCCESS == message:
    Log.print_success("Start task %d of %s on %s(%d) success" % (
      task_id, job_name, host, real_instance_id))
  else:
    Log.print_error("Start task %d of %s on %s(%d) fail: %s" % (
      task_id, job_name, host, real_instance_id, message))
Allocates memory from a resource's memory region.
dataset/ETHPy150Open XiaoMi/minos/client/deploy_utils.py/start_job--crossover with--dataset/ETHPy150Open hgrecco/pyvisa/pyvisa/highlevel.py/VisaLibraryBase.memory_allocation