diff --git a/integrations-service/integrations/routers/execution/execute.py b/integrations-service/integrations/routers/execution/execute.py index b4136588d..df4bf913a 100644 --- a/integrations-service/integrations/routers/execution/execute.py +++ b/integrations-service/integrations/routers/execution/execute.py @@ -7,12 +7,12 @@ @router.post("/execute/{provider}", tags=["execution"]) -def execute( +async def execute( provider: IdentifierName, data: ExecutionRequest, ) -> ExecutionResponse: try: - return execute_integration( + return await execute_integration( provider=provider, arguments=data.arguments, setup=data.setup ) except ValueError as e: diff --git a/integrations-service/integrations/utils/execute_integration.py b/integrations-service/integrations/utils/execute_integration.py index 7f7c257f0..fdc6d23d0 100644 --- a/integrations-service/integrations/utils/execute_integration.py +++ b/integrations-service/integrations/utils/execute_integration.py @@ -5,7 +5,7 @@ from ..providers import providers -def execute_integration( +async def execute_integration( provider: IdentifierName, arguments: ExecutionArguments, method: IdentifierName | None = None, @@ -32,6 +32,6 @@ def execute_integration( parsed_arguments = arguments_class(**arguments.model_dump()) if setup: - return execution_function(setup=setup, arguments=parsed_arguments) + return await execution_function(setup=setup, arguments=parsed_arguments) else: return execution_function(arguments=parsed_arguments) diff --git a/integrations-service/integrations/utils/integrations/brave.py b/integrations-service/integrations/utils/integrations/brave.py index 0331fa722..10bfe8084 100644 --- a/integrations-service/integrations/utils/integrations/brave.py +++ b/integrations-service/integrations/utils/integrations/brave.py @@ -3,7 +3,7 @@ from ...models import BraveSearchArguments, BraveSearchOutput, BraveSearchSetup -def search( +async def search( setup: BraveSearchSetup, arguments: BraveSearchArguments ) -> BraveSearchOutput: """ diff --git a/integrations-service/integrations/utils/integrations/browserbase.py b/integrations-service/integrations/utils/integrations/browserbase.py index ee259b1c4..7cc672662 100644 --- a/integrations-service/integrations/utils/integrations/browserbase.py +++ b/integrations-service/integrations/utils/integrations/browserbase.py @@ -3,7 +3,7 @@ from ...models import BrowserBaseLoadArguments, BrowserBaseLoadOutput, BrowserBaseSetup -def load( +async def load( setup: BrowserBaseSetup, arguments: BrowserBaseLoadArguments ) -> BrowserBaseLoadOutput: """ diff --git a/integrations-service/integrations/utils/integrations/hacker_news.py b/integrations-service/integrations/utils/integrations/hacker_news.py index 4b205067d..526024c72 100644 --- a/integrations-service/integrations/utils/integrations/hacker_news.py +++ b/integrations-service/integrations/utils/integrations/hacker_news.py @@ -3,7 +3,7 @@ from ...models import HackerNewsFetchArguments, HackerNewsFetchOutput -def fetch(arguments: HackerNewsFetchArguments) -> HackerNewsFetchOutput: +async def fetch(arguments: HackerNewsFetchArguments) -> HackerNewsFetchOutput: """ Fetches and formats content from a Hacker News thread using the provided URL. """ diff --git a/integrations-service/integrations/utils/integrations/spider.py b/integrations-service/integrations/utils/integrations/spider.py index d127290f2..a355e2347 100644 --- a/integrations-service/integrations/utils/integrations/spider.py +++ b/integrations-service/integrations/utils/integrations/spider.py @@ -3,7 +3,7 @@ from ...models import SpiderFetchArguments, SpiderFetchOutput, SpiderSetup -def crawl(setup: SpiderSetup, arguments: SpiderFetchArguments) -> SpiderFetchOutput: +async def crawl(setup: SpiderSetup, arguments: SpiderFetchArguments) -> SpiderFetchOutput: """ Fetches data from a specified URL. """ diff --git a/integrations-service/integrations/utils/integrations/weather.py b/integrations-service/integrations/utils/integrations/weather.py index 0bfa69080..e9393bc09 100644 --- a/integrations-service/integrations/utils/integrations/weather.py +++ b/integrations-service/integrations/utils/integrations/weather.py @@ -3,7 +3,7 @@ from ...models import WeatherGetArguments, WeatherGetOutput, WeatherSetup -def get(setup: WeatherSetup, arguments: WeatherGetArguments) -> WeatherGetOutput: +async def get(setup: WeatherSetup, arguments: WeatherGetArguments) -> WeatherGetOutput: """ Fetches weather data for a specified location using OpenWeatherMap API. """