Jump to solution
Details

The Fix

pip install celery==5.3.0b2

Based on closed celery/celery issue #7713 · PR/commit linked

Open PR/Commit
@@ -651,8 +651,11 @@ def ready(self): """Task completion count. + Note that `complete` means `successful` in this context. In other words, the + return value of this method is the number of ``successful`` tasks. +
fix.md
Option A — Upgrade to fixed release\npip install celery==5.3.0b2\nWhen NOT to use: This fix is not applicable if the intent is to count all ready tasks regardless of success.\n\n

Why This Fix Works in Production

  • Trigger: Happy to open a PR if that's an acceptable change.
  • Mechanism: The completed_count method only counts successfully completed tasks, not all tasks in the ready state
  • Why the fix works: Adds clarifying information to the documentation about the ResultSet.completed_count method, indicating that 'complete' means 'successful'. (first fixed release: 5.3.0b2).
Production impact:
  • If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).

Why This Breaks in Prod

  • The completed_count method only counts successfully completed tasks, not all tasks in the ready state
  • Production symptom (often without a traceback): Happy to open a PR if that's an acceptable change.

Proof / Evidence

  • GitHub issue: #7713
  • Fix PR: https://github.com/celery/celery/pull/7873
  • First fixed release: 5.3.0b2
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.75

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Hey @emilroz :wave:, Thank you for opening an issue”
@open-collective-bot · 2022-08-17 · source
“Sounds good to me. I'm more than happy to contribute the changes.”
@emilroz · 2022-09-16 · source
“or should we keep this open for prospective future API changes?”
@auvipy · 2022-11-03 · source

Failure Signature (Search String)

  • Happy to open a PR if that's an acceptable change.
  • Sounds good to me. I'm more than happy to contribute the changes.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Happy to open a PR if that's an acceptable change. Sounds good to me. I'm more than happy to contribute the changes.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Happy to open a PR if that's an acceptable change. Sounds good to me. I'm more than happy to contribute the changes.

What Broke

Users may misinterpret the completed_count as including all ready tasks, leading to confusion.

Why It Broke

The completed_count method only counts successfully completed tasks, not all tasks in the ready state

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install celery==5.3.0b2

When NOT to use: This fix is not applicable if the intent is to count all ready tasks regardless of success.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/celery/celery/pull/7873

First fixed release: 5.3.0b2

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if the intent is to count all ready tasks regardless of success.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
5.3.0b2 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.