Skip to content

change to prefork, with ADR note in docs - #133

Merged
pooleycodes merged 2 commits into
mainfrom
128-is-celery-timeout-limit-actually-being-used
Jul 21, 2026
Merged

change to prefork, with ADR note in docs#133
pooleycodes merged 2 commits into
mainfrom
128-is-celery-timeout-limit-actually-being-used

Conversation

@pooleycodes

@pooleycodes pooleycodes commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Async tasks were never being killed, an investigation revealed this was due to eventlet being used, this has been changed to prefork with ADR note in docs here for this.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Tested in local with SIGKILL working and tested in Dev.

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.

  • Yes
  • No, and this is why: Infrastructure change not logic change, tested in Dev.
  • I need help with writing tests

[optional] Are there any post deployment tasks we need to perform?

No

[optional] Are there any dependencies on other PRs or Work?

No

@pooleycodes pooleycodes linked an issue Jul 21, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@pooleycodes, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2372801-8fef-4828-ac92-773233eb1f01

📥 Commits

Reviewing files that changed from the base of the PR and between 6ac1b56 and 29ec5cd.

📒 Files selected for processing (2)
  • docs/celery-worker-pool.md
  • request-processor/docker-entrypoint.sh

Walkthrough

The Celery request-processor worker now runs with the prefork pool instead of eventlet. An ADR documents the decision, explicit concurrency configuration, operational consequences, and future ECS scaling options.

Changes

Celery prefork worker pool

Layer / File(s) Summary
Prefork decision and worker wiring
docs/celery-worker-pool.md, request-processor/docker-entrypoint.sh
The worker command switches to -P prefork while retaining CELERY_WORKER_CONCURRENCY with a default of 1; the ADR documents the execution model, resource implications, and scaling roadmap.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarises the main change: switching Celery to prefork and adding an ADR note in the docs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 128-is-celery-timeout-limit-actually-being-used

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/celery-worker-pool.md`:
- Around line 53-54: Update the concurrency statement in the Celery worker pool
documentation to avoid claiming there is no behavioral change; state only that
configured task concurrency remains 1, while preserving the existing note about
deliberately increasing it via the roadmap.
- Around line 22-27: Revise the Eventlet caveat in the workload discussion to
state that psycopg2 may cooperate when Eventlet greening is enabled, while this
workload’s transforms and database writes may still limit parallelism; avoid
presenting GIL or blocking C-call serialization as inherent. Also qualify any
claim that the 30-minute task_time_limit never fired, tying it to the deployed
Celery/Eventlet version or verified blocking-task evidence.

In `@request-processor/docker-entrypoint.sh`:
- Line 4: Quote the CELERY_WORKER_CONCURRENCY expansion in the Celery worker
command, using the default value of 1 while preserving it as a single argument
to --concurrency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4fa9e842-98d3-48df-b5a8-1fe8298bb68a

📥 Commits

Reviewing files that changed from the base of the PR and between 1da8fa6 and 6ac1b56.

📒 Files selected for processing (2)
  • docs/celery-worker-pool.md
  • request-processor/docker-entrypoint.sh

Comment thread docs/celery-worker-pool.md Outdated
Comment thread docs/celery-worker-pool.md Outdated
Comment thread request-processor/docker-entrypoint.sh Outdated

@gibahjoe gibahjoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@pooleycodes
pooleycodes merged commit 8fc04ae into main Jul 21, 2026
2 of 3 checks passed
@pooleycodes
pooleycodes deleted the 128-is-celery-timeout-limit-actually-being-used branch July 21, 2026 16:16
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.

Is Celery timeout limit actually being used?

2 participants