[grpc] update api to scheduler in grpc request manager (#16350)
This commit is contained in:
@@ -8,6 +8,7 @@ import copy
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import pickle
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
@@ -800,7 +801,9 @@ class GrpcRequestManager:
|
|||||||
async def _send_to_scheduler(self, obj):
|
async def _send_to_scheduler(self, obj):
|
||||||
"""Send an object to the scheduler via ZMQ."""
|
"""Send an object to the scheduler via ZMQ."""
|
||||||
try:
|
try:
|
||||||
self.send_to_scheduler.send_pyobj(obj)
|
self.send_to_scheduler.send_multipart(
|
||||||
|
[b"NORM", pickle.dumps(obj)], copy=False
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to send to scheduler: {e}")
|
logger.error(f"Failed to send to scheduler: {e}")
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user