|
27 | 27 | from celery.signals import worker_init, worker_shutdown |
28 | 28 | from celery.worker.worker import WorkController |
29 | 29 | from celery_library.signals import on_worker_init, on_worker_shutdown |
| 30 | +from celery_library.task_manager import CeleryTaskManager |
30 | 31 | from celery_library.utils import get_celery_worker |
31 | | -from celery_library.worker import CeleryTaskWorker |
32 | 32 | from faker import Faker |
33 | 33 | from fakeredis.aioredis import FakeRedis |
34 | 34 | from fastapi import FastAPI |
@@ -364,7 +364,7 @@ def upload_file( |
364 | 364 | create_upload_file_link_v2: Callable[..., Awaitable[FileUploadSchema]], |
365 | 365 | create_file_of_size: Callable[[ByteSize, str | None], Path], |
366 | 366 | create_simcore_file_id: Callable[[ProjectID, NodeID, str], SimcoreS3FileID], |
367 | | - with_storage_celery_worker: CeleryTaskWorker, |
| 367 | + with_storage_celery_worker: CeleryTaskManager, |
368 | 368 | ) -> Callable[ |
369 | 369 | [ByteSize, str, SimcoreS3FileID | None], Awaitable[tuple[Path, SimcoreS3FileID]] |
370 | 370 | ]: |
@@ -479,7 +479,7 @@ async def create_empty_directory( |
479 | 479 | create_simcore_file_id: Callable[[ProjectID, NodeID, str], SimcoreS3FileID], |
480 | 480 | create_upload_file_link_v2: Callable[..., Awaitable[FileUploadSchema]], |
481 | 481 | client: httpx.AsyncClient, |
482 | | - with_storage_celery_worker: CeleryTaskWorker, |
| 482 | + with_storage_celery_worker: CeleryTaskManager, |
483 | 483 | ) -> Callable[[str, ProjectID, NodeID], Awaitable[SimcoreS3FileID]]: |
484 | 484 | async def _directory_creator( |
485 | 485 | dir_name: str, project_id: ProjectID, node_id: NodeID |
@@ -1029,7 +1029,7 @@ def _on_worker_init_wrapper(sender: WorkController, **_kwargs) -> None: |
1029 | 1029 | @pytest.fixture |
1030 | 1030 | def with_storage_celery_worker( |
1031 | 1031 | with_storage_celery_worker_controller: TestWorkController, |
1032 | | -) -> CeleryTaskWorker: |
| 1032 | +) -> CeleryTaskManager: |
1033 | 1033 | assert isinstance(with_storage_celery_worker_controller.app, Celery) |
1034 | 1034 | return get_celery_worker(with_storage_celery_worker_controller.app) |
1035 | 1035 |
|
|
0 commit comments