src/ray/raylet/lib/python/common_extension.cc
PyObject *PyTask_to_string(PyObject *self, PyObject *args) {
  PyObject *arg;
  if (!PyArg_ParseTuple(args, "O", &arg)) {
    return NULL;
  }
  PyTask *task = (PyTask *)arg;
  flatbuffers::FlatBufferBuilder fbb;
  auto task_spec_string = task->task_spec->ToFlatbuffer(fbb);
  fbb.Finish(task_spec_string);
  return PyBytes_FromStringAndSize((char *)fbb.GetBufferPointer(), fbb.GetSize());
}
/**
 * Convert a Ray task specification Python object to a string.
 *
 * This is called from Python like
 *
 * s = raylet.task_to_string(task)
 *
 * @param task Ray task specification Python object.
 * @return String representing the task specification.
 */
Convert a Ray task specification Python object to a string.
This is called from Python like



@param task Ray task specification Python object.
@return String representing the task specification.
Convert a Ray task specification Python object to a string . This is called from Python like @param task Ray task specification Python object . @return String representing the task specification .
PyObject *PyTask_to_string(PyObject *self, PyObject *args) {
  PyObject *arg;
  if (!PyArg_ParseTuple(args, "O", &arg)) {
    return NULL;
  }
  PyTask *task = (PyTask *)arg;
  flatbuffers::FlatBufferBuilder fbb;
  auto task_spec_string = task->task_spec->ToFlatbuffer(fbb);
  fbb.Finish(task_spec_string);
  return PyBytes_FromStringAndSize((char *)fbb.GetBufferPointer(), fbb.GetSize());
}
PyObject * PyTask_to_string ( PyObject * self , PyObject * args ) { PyObject * arg ; if ( ! PyArg_ParseTuple ( args , " " , & arg ) ) { return NULL ; } PyTask * task = ( PyTask * ) arg ; flatbuffers :: FlatBufferBuilder fbb ; auto task_spec_string = task -> task_spec -> ToFlatbuffer ( fbb ) ; fbb . Finish ( task_spec_string ) ; return PyBytes_FromStringAndSize ( ( char * ) fbb . GetBufferPointer ( ) , fbb . GetSize ( ) ) ; }
Convert a Ray task specification Python object to a string.
Convert a Ray task specification Python object to a string .