|
50 | 50 | from .query_groups import InfrahubGroupContext, InfrahubGroupContextSync |
51 | 51 | from .schema import InfrahubSchema, InfrahubSchemaSync, NodeSchemaAPI |
52 | 52 | from .store import NodeStore, NodeStoreSync |
| 53 | +from .task.manager import InfrahubTaskManager, InfrahubTaskManagerSync |
53 | 54 | from .timestamp import Timestamp |
54 | 55 | from .types import AsyncRequester, HTTPMethod, Order, SyncRequester |
55 | 56 | from .utils import decode_json, get_user_permissions, is_valid_uuid |
@@ -268,6 +269,7 @@ def _initialize(self) -> None: |
268 | 269 | self.branch = InfrahubBranchManager(self) |
269 | 270 | self.object_store = ObjectStore(self) |
270 | 271 | self.store = NodeStore() |
| 272 | + self.task = InfrahubTaskManager(self) |
271 | 273 | self.concurrent_execution_limit = asyncio.Semaphore(self.max_concurrent_execution) |
272 | 274 | self._request_method: AsyncRequester = self.config.requester or self._default_request_method |
273 | 275 | self.group_context = InfrahubGroupContext(self) |
@@ -1500,13 +1502,19 @@ async def __aexit__( |
1500 | 1502 |
|
1501 | 1503 |
|
1502 | 1504 | class InfrahubClientSync(BaseClient): |
| 1505 | + schema: InfrahubSchemaSync |
| 1506 | + branch: InfrahubBranchManagerSync |
| 1507 | + object_store: ObjectStoreSync |
| 1508 | + store: NodeStoreSync |
| 1509 | + task: InfrahubTaskManagerSync |
1503 | 1510 | group_context: InfrahubGroupContextSync |
1504 | 1511 |
|
1505 | 1512 | def _initialize(self) -> None: |
1506 | 1513 | self.schema = InfrahubSchemaSync(self) |
1507 | 1514 | self.branch = InfrahubBranchManagerSync(self) |
1508 | 1515 | self.object_store = ObjectStoreSync(self) |
1509 | 1516 | self.store = NodeStoreSync() |
| 1517 | + self.task = InfrahubTaskManagerSync(self) |
1510 | 1518 | self._request_method: SyncRequester = self.config.sync_requester or self._default_request_method |
1511 | 1519 | self.group_context = InfrahubGroupContextSync(self) |
1512 | 1520 |
|
|
0 commit comments