From 85deb758b5287b666072ba85edff53200590e385 Mon Sep 17 00:00:00 2001 From: talsabagport Date: Mon, 21 Oct 2024 09:58:38 +0300 Subject: [PATCH] test sync requests again --- integrations/jira/jira/client.py | 25 +++++++------------------ integrations/jira/pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/integrations/jira/jira/client.py b/integrations/jira/jira/client.py index 9860c0e126..c381c31869 100644 --- a/integrations/jira/jira/client.py +++ b/integrations/jira/jira/client.py @@ -1,4 +1,3 @@ -import asyncio import typing from typing import Any, AsyncGenerator @@ -50,24 +49,20 @@ def _generate_base_req_params( } async def _get_paginated_projects(self, params: dict[str, Any]) -> dict[str, Any]: - project_response = await asyncio.to_thread( - self.client.get, f"{self.api_url}/project/search", params=params + project_response = self.client.get( + f"{self.api_url}/project/search", params=params ) project_response.raise_for_status() return project_response.json() async def _get_paginated_issues(self, params: dict[str, Any]) -> dict[str, Any]: - issue_response = await asyncio.to_thread( - self.client.get, f"{self.api_url}/search", params=params - ) + issue_response = self.client.get(f"{self.api_url}/search", params=params) issue_response.raise_for_status() return issue_response.json() async def create_events_webhook(self, app_host: str) -> None: webhook_target_app_host = f"{app_host}/integration/webhook" - webhook_check_response = await asyncio.to_thread( - self.client.get, f"{self.webhooks_url}" - ) + webhook_check_response = self.client.get(f"{self.webhooks_url}") webhook_check_response.raise_for_status() webhook_check = webhook_check_response.json() @@ -82,16 +77,12 @@ async def create_events_webhook(self, app_host: str) -> None: "events": WEBHOOK_EVENTS, } - webhook_create_response = await asyncio.to_thread( - self.client.post, f"{self.webhooks_url}", json=body - ) + webhook_create_response = self.client.post(f"{self.webhooks_url}", json=body) webhook_create_response.raise_for_status() logger.info("Ocean real time reporting webhook created") async def get_single_project(self, project_key: str) -> dict[str, Any]: - project_response = await asyncio.to_thread( - self.client.get, f"{self.api_url}/project/{project_key}" - ) + project_response = self.client.get(f"{self.api_url}/project/{project_key}") project_response.raise_for_status() return project_response.json() @@ -119,9 +110,7 @@ async def get_paginated_projects( params["startAt"] += PAGE_SIZE async def get_single_issue(self, issue_key: str) -> dict[str, Any]: - issue_response = await asyncio.to_thread( - self.client.get, f"{self.api_url}/issue/{issue_key}" - ) + issue_response = self.client.get(f"{self.api_url}/issue/{issue_key}") issue_response.raise_for_status() return issue_response.json() diff --git a/integrations/jira/pyproject.toml b/integrations/jira/pyproject.toml index 658b07ea55..194aab6b35 100644 --- a/integrations/jira/pyproject.toml +++ b/integrations/jira/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jira" -version = "0.1.89-dev024" +version = "0.1.89-dev025" description = "Integration to bring information from Jira into Port" authors = ["Mor Paz "]