Skip to content

Commit

Permalink
[Serve] Call serve.init in function handler (ray-project#7947)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo authored Apr 9, 2020
1 parent d2b5c17 commit 870271d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/ray/serve/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import inspect

import ray
from ray import serve
from ray.serve import context as serve_context
from ray.serve.context import FakeFlaskRequest
from collections import defaultdict
Expand All @@ -19,6 +20,8 @@ class TaskRunner:
"""

def __init__(self, func_to_run):
serve.init()

self.func = func_to_run

# This parameter let argument inspection work with inner function.
Expand Down

0 comments on commit 870271d

Please sign in to comment.