-
Notifications
You must be signed in to change notification settings - Fork 341
Open
Description
I have the following code. it is running from many threads for different gcs blobs:
signed_url: str = blob.generate_signed_url(
version="v4",
expiration=timedelta(minutes=100),
method=method,
content_type=content_type,
headers=headers,
credentials=self._signing_credentials,
)
where the credentials are
google.authcompute_engine.IDTokenCredentials
Now the problem is that these credentials need to be refreshed in the before_request:
self._blocking_refresh(request) |
but this is not thread safe
def _blocking_refresh(self, request): |
def _blocking_refresh(self, request):
if not self.valid:
self.refresh(request)
do i miss something?
what do you suggest ? ignoring the issue because it is normally not a problem and can just cause multiple http calls ?
Metadata
Metadata
Assignees
Labels
No labels