Skip to content

Commit

Permalink
refactor: added timeout to as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Irfanuddin committed Aug 2, 2022
1 parent 5e5352f commit 76cbeb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/actions/people/app/main.py
Expand Up @@ -260,14 +260,15 @@ class Settings(BaseSettings):
input_token: SecretStr
input_standard_token: SecretStr
github_repository: str
http_read_time_out: int = 30


def get_graphql_response(
*, settings: Settings, query: str, after: Union[str, None] = None
):
headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
variables = {"after": after}
httpx_time_out = httpx.Timeout(read=30)
httpx_time_out = httpx.Timeout(read=settings.http_read_time_out)
response = httpx.post(
github_graphql_url,
headers=headers,
Expand Down

0 comments on commit 76cbeb1

Please sign in to comment.