[core worker] Python core worker normal task submission (#5566)

This commit is contained in:
Edward Oakes
2019-09-14 13:02:53 -07:00
committed by Eric Liang
parent 5f88823c49
commit a5d7de6aaf
11 changed files with 194 additions and 80 deletions
+7 -4
View File
@@ -707,11 +707,14 @@ class Worker(object):
self.current_job_id, self.current_task_id,
self.task_context.task_index, actor_id)
else:
# This is a normal task.
task_id = TaskID.for_normal_task(self.current_job_id,
self.current_task_id,
self.task_context.task_index)
# Normal tasks are submitted through the core worker (in the
# future, all tasks will be).
return self.core_worker.submit_task(function_descriptor_list,
args_for_raylet,
num_return_vals, resources)
# Actor creation tasks and actor tasks are submitted directly to
# the raylet.
task = ray._raylet.TaskSpec(
task_id,
job_id,