def stop_job(service, service_config, host, job_name, instance_id):
  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("Stopping 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)
  message = supervisor_client.stop()
  if SUPERVISOR_SUCCESS == message:
    Log.print_success("Stop task %d of %s on %s(%d) success" % (
      task_id, job_name, host, real_instance_id))
  else:
    Log.print_error("Stop task %d of %s on %s(%d) fail: %s" % (
      task_id, job_name, host, real_instance_id, message))
Stop the task of specified service and job.
dataset/ETHPy150Open XiaoMi/minos/client/deploy_utils.py/stop_job