File tree Expand file tree Collapse file tree 2 files changed +0
-17
lines changed
services/storage/src/simcore_service_storage Expand file tree Collapse file tree 2 files changed +0
-17
lines changed Original file line number Diff line number Diff line change 1- import asyncio
2-
31from fastapi import FastAPI
42from servicelib .fastapi .long_running_tasks ._server import setup
53
@@ -11,10 +9,3 @@ def setup_rest_api_long_running_tasks_for_uploads(app: FastAPI) -> None:
119 app ,
1210 router_prefix = f"/{ API_VTAG } /futures" ,
1311 )
14-
15- app .state .completed_upload_tasks = {}
16-
17-
18- def get_completed_upload_tasks (app : FastAPI ) -> dict [str , asyncio .Task ]:
19- assert isinstance (app .state .completed_upload_tasks , dict ) # nosec
20- return app .state .completed_upload_tasks
Original file line number Diff line number Diff line change 1- import hashlib
21import logging
32from pathlib import Path
43
54import aiofiles
65import httpx
76from aiohttp .typedefs import StrOrURL
87from aws_library .s3 import UploadID
9- from models_library .projects_nodes_io import StorageFileID
10- from models_library .users import UserID
118
129from ..constants import MAX_CHUNK_SIZE , S3_UNDEFINED_OR_EXTERNAL_MULTIPART_ID
1310from ..models import FileMetaData , FileMetaDataAtDB
@@ -68,11 +65,6 @@ def is_file_entry_valid(file_metadata: FileMetaData | FileMetaDataAtDB) -> bool:
6865 )
6966
7067
71- def create_upload_completion_task_name (user_id : UserID , file_id : StorageFileID ) -> str :
72- the_hash = hashlib .sha256 (f"{ user_id } _{ file_id } " .encode ()).hexdigest ()
73- return f"upload_complete_task_{ the_hash } "
74-
75-
7668def is_valid_managed_multipart_upload (upload_id : UploadID | None ) -> bool :
7769 """the upload ID is valid (created by storage service) AND internally managed by storage (e.g. PRESIGNED multipart upload)
7870
You can’t perform that action at this time.
0 commit comments