mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 22:54:24 -07:00
Add Log Analytics Ingestion auth timeout
Previous behavior was to use the 'request' module's default timeout; this makes auth timeout value consistent with the task submission timeout value.
This commit is contained in:
parent
eb7d846804
commit
1df54c9699
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ class AzureLogAnalyticsIngestionSource(object):
|
|||
# and https://learn.microsoft.com/en-us/entra/identity-platform/scopes-oidc#the-default-scope
|
||||
'scope': 'https://monitor.azure.com/.default'
|
||||
}
|
||||
response = self.requests_session.post(url, data=payload)
|
||||
response = self.requests_session.post(url, data=payload, timeout=2)
|
||||
response.raise_for_status()
|
||||
self.token_expiration_time = datetime.now() + timedelta(seconds=response.json().get("expires_in"))
|
||||
return response.json().get('access_token')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue