From 55154e832e74fd8a15c823102b1b1dc26d9a3b96 Mon Sep 17 00:00:00 2001 From: Default28 Date: Wed, 27 Nov 2024 17:02:24 +0530 Subject: [PATCH] Added IndexifyClient in task_reporter.py --- python-sdk/indexify/executor/agent.py | 6 ++++-- .../indexify/executor/task_reporter/task_reporter.py | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python-sdk/indexify/executor/agent.py b/python-sdk/indexify/executor/agent.py index 66635de8a..26006c963 100644 --- a/python-sdk/indexify/executor/agent.py +++ b/python-sdk/indexify/executor/agent.py @@ -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): diff --git a/python-sdk/indexify/executor/task_reporter/task_reporter.py b/python-sdk/indexify/executor/task_reporter/task_reporter.py index 1b786272a..cd6e9c4cc 100644 --- a/python-sdk/indexify/executor/task_reporter/task_reporter.py +++ b/python-sdk/indexify/executor/task_reporter/task_reporter.py @@ -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 ( @@ -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"))