Code cleanup about python3 asyncio compat (#11134)

* cleanup python3 compat and others
This commit is contained in:
Siyuan (Ryans) Zhuang
2020-09-30 14:22:25 -07:00
committed by GitHub
parent 0dcfa9ed6c
commit f0dba6bd2b
6 changed files with 18 additions and 33 deletions
+1 -4
View File
@@ -136,10 +136,7 @@ def wrap_to_ray_error(exception: Exception) -> RayTaskError:
def ensure_async(func: Callable) -> Callable:
if inspect.iscoroutinefunction(func):
return func
else:
return sync_to_async(func)
return sync_to_async(func)
class RayServeWorker: