mirror of
https://github.com/wassname/ray.git
synced 2026-07-14 11:17:54 +08:00
Register Common.error with local scheduler extension module. (#1316)
* Register Common.error with local scheduler extension module. * Add test.
This commit is contained in:
committed by
Philipp Moritz
parent
b6a35e0395
commit
f75b51d178
@@ -287,10 +287,10 @@ MOD_INIT(liblocal_scheduler_library) {
|
||||
|
||||
g_task_builder = make_task_builder();
|
||||
|
||||
char local_scheduler_error[] = "local_scheduler.error";
|
||||
LocalSchedulerError = PyErr_NewException(local_scheduler_error, NULL, NULL);
|
||||
Py_INCREF(LocalSchedulerError);
|
||||
PyModule_AddObject(m, "local_scheduler_error", LocalSchedulerError);
|
||||
char common_error[] = "common.error";
|
||||
CommonError = PyErr_NewException(common_error, NULL, NULL);
|
||||
Py_INCREF(CommonError);
|
||||
PyModule_AddObject(m, "common_error", CommonError);
|
||||
|
||||
Py_INCREF(&PyRayConfigType);
|
||||
PyModule_AddObject(m, "RayConfig", (PyObject *) &PyRayConfigType);
|
||||
|
||||
Reference in New Issue
Block a user