Increase TaskID size by 2 bytes, taken from JobID (#6425)

* Increase TaskID size by 2 bytes, taken from JobID

* comments

* check max job id

* fix doc

* fix local mode
This commit is contained in:
Edward Oakes
2019-12-11 10:45:14 -08:00
committed by GitHub
parent abb4fb3f8e
commit 82f7dbc7a7
5 changed files with 14 additions and 14 deletions
+1
View File
@@ -288,6 +288,7 @@ cdef class JobID(BaseID):
@classmethod
def from_int(cls, value):
assert value < 65536, "Maximum JobID integer is 65535."
return cls(CJobID.FromInt(value).Binary())
@classmethod
+1 -2
View File
@@ -1111,9 +1111,8 @@ def connect(node,
if setproctitle:
setproctitle.setproctitle("ray::IDLE")
elif mode is LOCAL_MODE:
# Code path of local mode
if job_id is None:
job_id = JobID.from_int(random.randint(1, 100000))
job_id = JobID.from_int(random.randint(1, 65535))
worker.worker_id = ray.utils.compute_driver_id_from_job(
job_id).binary()
else: