Add configurable timeout to the consolidation requests#1340
Conversation
961f8ad to
87b648a
Compare
5e68606 to
ced8246
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds configurable timeout settings for consolidation service API calls (CrossRef and biblio-glutton), allowing users to control how long GROBID waits for external service responses. The default timeout is 60 seconds, with CrossRef configured at 10 seconds in the default YAML config.
Key changes:
- Introduces
timeoutSecconfiguration parameters for both CrossRef and Glutton consolidation services - Implements timeout configuration in HTTP request handling for both services
- Updates documentation to explain timeout configuration and warnings about aggressive querying
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| grobid-home/config/grobid.yaml | Adds timeout configuration options for glutton (60s) and crossref (10s) services with explanatory comments |
| grobid-core/src/main/java/org/grobid/core/utilities/GrobidConfig.java | Adds timeoutSec fields to CrossrefParameters and HostParameters classes with 60-second defaults |
| grobid-core/src/main/java/org/grobid/core/utilities/GrobidProperties.java | Adds getter methods for retrieving timeout values from configuration |
| grobid-core/src/main/java/org/grobid/core/utilities/glutton/GluttonRequest.java | Implements timeout configuration in HTTP request handling for Glutton service |
| grobid-core/src/main/java/org/grobid/core/utilities/crossref/CrossrefRequest.java | Implements timeout configuration in HTTP request handling for CrossRef service and updates version strings |
| grobid-core/src/main/java/org/grobid/core/utilities/crossref/CrossrefClient.java | Refactors method signatures and naming conventions (unrelated to timeout feature) |
| grobid-core/src/main/java/org/grobid/core/utilities/Consolidation.java | Minor code style improvements |
| doc/Consolidation.md | Adds documentation section explaining timeout configuration with examples and warnings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR adds a way to configure the timeout of the consolidation service which is by default 60 seconds.
This setting is more likely to be useful for citation consolidations (which, as we mentioned in several occasions, should not be abused), where the service is not fast enough to respond. It will increase the waiting time of Grobid if the consolidation service is slow to answer.
Note: that increasing the timeout require also adjustment in the grobid_client timeout.