Skip to content

Commit

Permalink
Added IndexifyClient in task_reporter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Default2882 committed Nov 27, 2024
1 parent 6243033 commit 55154e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 4 additions & 2 deletions python-sdk/indexify/executor/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ def __init__(
self._task_reporter = TaskReporter(
base_url=self._base_url,
executor_id=self._executor_id,
config_path=self._config_path,
task_store=self._task_store,
indexify_client=IndexifyClient(
service_url=self._base_url,
config_path=self._config_path,
),
)

async def task_launcher(self):
Expand Down
8 changes: 3 additions & 5 deletions python-sdk/indexify/executor/task_reporter/task_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from rich import print
from rich.text import Text

from indexify.common_util import get_httpx_client
from indexify import IndexifyClient
from indexify.executor.api_objects import RouterOutput as ApiRouterOutput
from indexify.executor.api_objects import TaskResult
from indexify.executor.task_reporter.task_reporter_utils import (
Expand Down Expand Up @@ -43,13 +43,11 @@ def __init__(
self,
base_url: str,
executor_id: str,
task_store: TaskStore,
config_path: Optional[str] = None,
indexify_client: IndexifyClient,
):
self._base_url = base_url
self._executor_id = executor_id
self._client = get_httpx_client(config_path)
self._task_store = task_store
self._client = indexify_client

async def run(self):
console.print(Text("Starting TaskReporter", style="bold cyan"))
Expand Down

0 comments on commit 55154e8

Please sign in to comment.