Skip to content

Retry RESOURCE_EXHAUSTED errors #15082

Description

@yan-hic

We are using a cloud function that, among others, calls DocumentAI. Assuming the latter has implemented the Retry dependency correctly, we have the following code that should retry when hitting a (retriable) quota limit:

result = doc_ai.process_document(
request={"name": PROCESSORS[processor_key],
"raw_document": {"content": self.content,
"mime_type": "application/pdf"}},
retry=retry.Retry(
predicate=retry.if_exception_type(exceptions.ResourceExhausted),
deadline=300)
)
document = result.document

However, the call is not retried as cloud logging shows:
image

Any clue ?

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions