Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/adr/0003-connect-both-worker-signal-pairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
alone covers every pool. The process pair fires only under prefork and solo, once per forked child,
keeping cached resources and finalizers fork-safe; the worker pair fires once in the main process and
is the only pair the gevent, eventlet and threads pools send, since those never fork. Connecting only
the process pair is the bug 3.0.1 fixed: under `modern-di` 3.x's mandatory-open lifecycle the root
container stayed closed under the non-forking pools and every `@inject` task raised. The overlap is
harmless: `open()` is a no-op on an open container, `close_sync()` when nothing was cached.
the process pair is the bug 3.0.1 fixed. `modern-di` 3.0 raised on a resolve from a closed container,
and 4.x does again, so under the non-forking pools the root container stayed closed and every
`@inject` task raised. The overlap is harmless: `open()` is a no-op on an open container,
`close_sync()` when nothing was cached.
`weak=False` belongs to the same decision: Celery holds receivers weakly by default and these
closures have no other strong reference, so a weak connection lets them be collected and the handlers
never run.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
dependencies = [
# celery caps billiard below 4 until 5.3, and billiard 3 cannot format a traceback on 3.11+.
"celery>=5.3,<6",
"modern-di>=3,<4",
"modern-di>=4,<5",
]
version = "0"

Expand Down
Loading