Introduce constant for ID_SIZE in python code. (#2517)

This commit is contained in:
Robert Nishihara
2018-07-31 12:40:53 -07:00
committed by Philipp Moritz
parent 64d00ff39e
commit 909d7172b1
12 changed files with 60 additions and 58 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import copy
import hashlib
import inspect
import ray.ray_constants as ray_constants
import ray.signature
# Default parameters for remote functions.
@@ -37,7 +38,7 @@ def compute_function_id(function):
pass
# Compute the function ID.
function_id = function_id_hash.digest()
assert len(function_id) == 20
assert len(function_id) == ray_constants.ID_SIZE
function_id = ray.ObjectID(function_id)
return function_id