mirror of
https://github.com/wassname/ray.git
synced 2026-09-22 13:30:36 +08:00
Code cleanup about python3 asyncio compat (#11134)
* cleanup python3 compat and others
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user