Skip to content

Conversation

@fclabs
Copy link
Contributor

@fclabs fclabs commented Dec 22, 2025

Issue resolved by this Pull Request:
Resolves #458

Description

This PR makes the RQ results_ttl (Time To Live) configurable via the DOCLING_SERVE_ENG_RQ_RESULTS_TTL environment variable, addressing the feature request in issue #458.

Changes

  1. Added eng_rq_results_ttl setting to DoclingServeSettings with default value of 4 hours (matching current behavior)
  2. Updated orchestrator_factory.py to pass results_ttl when creating RQOrchestratorConfig
  3. Updated __main__.py to pass results_ttl when creating RQOrchestratorConfig in the rq_worker command
  4. Updated documentation in docs/configuration.md to document the new setting

Benefits

  • Flexibility: Users can configure TTL based on their specific needs (long-running workflows, memory optimization, compliance requirements)
  • Backward Compatible: Default value (4 hours) matches current behavior
  • Consistency: Follows the existing pattern for RQ engine configuration
  • No Breaking Changes: Existing deployments will continue to work with the default value

Usage

Users can now configure the TTL via environment variable:

export DOCLING_SERVE_ENG_RQ_RESULTS_TTL=7200  # 2 hours

Or in .env file:

DOCLING_SERVE_ENG_RQ_RESULTS_TTL=86400  # 24 hours

Testing

  • ✅ Default value (4 hours) is used when not set
  • ✅ Custom value is respected when set via environment variable
  • ✅ Value is correctly passed to RQOrchestratorConfig in both orchestrator factory and rq_worker command

- Add eng_rq_results_ttl setting to DoclingServeSettings with default 4 hours
- Pass results_ttl when creating RQOrchestratorConfig in orchestrator_factory.py
- Pass results_ttl when creating RQOrchestratorConfig in rq_worker command
- Update configuration documentation with new DOCLING_SERVE_ENG_RQ_RESULTS_TTL setting

This allows users to configure the Time To Live for RQ job results in Redis,
enabling flexibility for different use cases (long-running workflows, memory
optimization, compliance requirements).
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

DCO Check Failed

Hi @fclabs, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for Federico Castañeda <[email protected]>

I, Federico Castañeda <[email protected]>, hereby add my Signed-off-by to this commit: 9421bb13ec66983f76f4bc1bdaba52d1d27fef39"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@dosubot
Copy link

dosubot bot commented Dec 22, 2025

Related Documentation

Checked 10 published document(s) in 0 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@mergify
Copy link

mergify bot commented Dec 22, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm dolfim-ibm self-requested a review December 23, 2025 07:20
Copy link
Member

@dolfim-ibm dolfim-ibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@fclabs
Copy link
Contributor Author

fclabs commented Dec 26, 2025

lgtm

Hi, @dolfim-ibm What else it is required to merge this one? Thank you in advance.

@dolfim-ibm dolfim-ibm merged commit c57dd51 into docling-project:main Jan 5, 2026
10 checks passed
marcomaggiotti added a commit to marcomaggiotti/docling-serve that referenced this pull request Jan 6, 2026
marcomaggiotti added a commit to marcomaggiotti/docling-serve that referenced this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add DOCLING_SERVE_ENG_RQ_RESULTS_TTL Environment Variable

3 participants