Skip to content

Commit f8067e0

Browse files
committed
docs: update imports to use public diracx.tasks.depends module
Update documentation examples to import NoTransaction and CallbackSpawner from diracx.tasks.depends instead of reaching into diracx.tasks.plumbing.depends. Also add CallbackSpawner to the public re-export.
1 parent 88092d6 commit f8067e0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

diracx-tasks/src/diracx/tasks/depends.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from __future__ import annotations
44

5-
from diracx.tasks.plumbing.depends import NoTransaction
5+
from diracx.tasks.plumbing.depends import CallbackSpawner, NoTransaction
66

7-
__all__ = ("NoTransaction",)
7+
__all__ = ("CallbackSpawner", "NoTransaction")

docs/dev/how-to/use-task-callbacks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The callback system provides a fan-out/fan-in pattern: spawn multiple child task
77
Use `CallbackSpawner` to schedule children and a callback together:
88

99
```python
10-
from diracx.tasks.plumbing.depends import CallbackSpawner
10+
from diracx.tasks.depends import CallbackSpawner
1111

1212

1313
class OrchestrationTask(BaseTask):
@@ -40,7 +40,7 @@ The children are scheduled immediately. When the last child completes, the worke
4040
`CallbackSpawner` is a dependency injection type resolved by the worker. Declare it as a typed parameter in `execute()`:
4141

4242
```python
43-
from diracx.tasks.plumbing.depends import CallbackSpawner
43+
from diracx.tasks.depends import CallbackSpawner
4444

4545

4646
class MyTask(BaseTask):

docs/dev/reference/dependency-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ For cases where a database connection is needed without a transaction (e.g., a t
104104
from typing import Annotated
105105

106106
from diracx.db.sql import SandboxMetadataDB
107-
from diracx.tasks.plumbing.depends import NoTransaction
107+
from diracx.tasks.depends import NoTransaction
108108

109109

110110
async def execute(

0 commit comments

Comments
 (0)