[minor] Remove get_global_worker(), RuntimeContext (#7638)

This commit is contained in:
Edward Oakes
2020-03-20 15:45:29 -05:00
committed by GitHub
parent 7ebc6783e4
commit 58dc70f90e
12 changed files with 33 additions and 69 deletions
@@ -33,8 +33,7 @@ class Worker:
def init_writer(self, output_channel, reader_actor):
conf = {
Config.TASK_JOB_ID: ray.runtime_context._get_runtime_context()
.current_driver_id,
Config.TASK_JOB_ID: ray.worker.global_worker.current_job_id,
Config.CHANNEL_TYPE: Config.NATIVE_CHANNEL
}
self.writer = transfer.DataWriter([output_channel],
@@ -43,8 +42,7 @@ class Worker:
def init_reader(self, input_channel, writer_actor):
conf = {
Config.TASK_JOB_ID: ray.runtime_context._get_runtime_context()
.current_driver_id,
Config.TASK_JOB_ID: ray.worker.global_worker.current_job_id,
Config.CHANNEL_TYPE: Config.NATIVE_CHANNEL
}
self.reader = transfer.DataReader([input_channel],