Skip to content

Commit eff9798

Browse files
committed
after renaming fix
1 parent 5560ebe commit eff9798

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

services/storage/src/simcore_service_storage/api/rest/datasets.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
routes = RouteTableDef()
2727

28-
UPLOAD_TASKS_KEY = f"{__name__}.upload_tasks"
29-
3028

3129
@routes.get(
3230
f"/{API_VTAG}/locations/{{location_id}}/datasets", name="list_datasets_metadata"

services/storage/src/simcore_service_storage/api/rest/files.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
)
2828

2929
from ..._meta import API_VTAG
30+
from ...constants import UPLOAD_TASKS_KEY
3031
from ...dsm import get_dsm_provider
3132
from ...exceptions import FileMetaDataNotFoundError
3233
from ...models import (
@@ -48,8 +49,6 @@
4849

4950
routes = RouteTableDef()
5051

51-
UPLOAD_TASKS_KEY = f"{__name__}.upload_tasks"
52-
5352

5453
@routes.get(
5554
f"/{API_VTAG}/locations/{{location_id}}/files/metadata", name="list_files_metadata"

services/storage/src/simcore_service_storage/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def create(settings: Settings) -> web.Application:
7474
if settings.STORAGE_PROFILING:
7575
app.middlewares.append(profiling_middleware)
7676

77-
if settings.STORAGE_LOG_LEVEL == "DEBUG":
77+
if settings.LOG_LEVEL == "DEBUG":
7878
setup_dev_error_logger(app)
7979

8080
if settings.STORAGE_MONITORING_ENABLED:

services/storage/src/simcore_service_storage/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
MAX_CHUNK_SIZE = 1024
1010
MINUTE = 60
1111

12+
UPLOAD_TASKS_KEY = f"{__name__}.upload_tasks"
1213

1314
APP_CONFIG_KEY = application_keys.APP_CONFIG_KEY # app-storage-key for config object
1415

services/storage/src/simcore_service_storage/routes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from ._meta import API_VTAG
1313
from .api.rest import datasets, files, health, locations, simcore_s3
14+
from .constants import UPLOAD_TASKS_KEY
1415
from .resources import storage_resources
1516

1617
_logger = logging.getLogger(__name__)
@@ -45,7 +46,7 @@ def setup_rest_api_routes(app: web.Application):
4546
_logger.debug("routes: %s", get_named_routes_as_message(app))
4647

4748
# prepare container for upload tasks
48-
app[files.UPLOAD_TASKS_KEY] = {}
49+
app[UPLOAD_TASKS_KEY] = {}
4950

5051
# Enable error, validation and envelop middleware on API routes
5152
append_rest_middlewares(app, api_version=f"/{API_VTAG}")

services/storage/src/simcore_service_storage/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Settings(BaseCustomSettings, MixinLoggingSettings):
2424
STORAGE_HOST: str = "0.0.0.0" # nosec
2525
STORAGE_PORT: PortInt = TypeAdapter(PortInt).validate_python(8080)
2626

27-
STORAGE_LOG_LEVEL: Annotated[
27+
LOG_LEVEL: Annotated[
2828
LogLevel,
2929
Field(
3030
validation_alias=AliasChoices("STORAGE_LOGLEVEL", "LOG_LEVEL", "LOGLEVEL"),

services/storage/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
from settings_library.s3 import S3Settings
5151
from simcore_postgres_database.storage_models import file_meta_data, projects, users
5252
from simcore_service_storage.application import create
53+
from simcore_service_storage.constants import UPLOAD_TASKS_KEY
5354
from simcore_service_storage.dsm import get_dsm_provider
54-
from simcore_service_storage.files import UPLOAD_TASKS_KEY
5555
from simcore_service_storage.models import S3BucketName
5656
from simcore_service_storage.s3 import get_s3_client
5757
from simcore_service_storage.settings import Settings

services/storage/tests/unit/test_handlers_files.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
from pytest_simcore.helpers.parametrizations import byte_size_ids
5151
from pytest_simcore.helpers.s3 import upload_file_part, upload_file_to_presigned_link
5252
from servicelib.aiohttp import status
53-
from simcore_service_storage.constants import S3_UNDEFINED_OR_EXTERNAL_MULTIPART_ID
54-
from simcore_service_storage.files import UPLOAD_TASKS_KEY
53+
from simcore_service_storage.constants import (
54+
S3_UNDEFINED_OR_EXTERNAL_MULTIPART_ID,
55+
UPLOAD_TASKS_KEY,
56+
)
5557
from simcore_service_storage.models import S3BucketName, UploadID
5658
from tenacity.asyncio import AsyncRetrying
5759
from tenacity.retry import retry_if_exception_type

services/storage/tests/unit/test_handlers_health.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
import simcore_service_storage._meta
88
from aiohttp.test_utils import TestClient
9-
from models_library.api_schemas_storage import S3BucketName
9+
from models_library.api_schemas_storage import HealthCheck, S3BucketName
1010
from models_library.app_diagnostics import AppStatusCheck
1111
from moto.server import ThreadedMotoServer
1212
from pytest_simcore.helpers.assert_checks import assert_status
1313
from servicelib.aiohttp import status
14-
from simcore_service_storage.health import HealthCheck
1514
from types_aiobotocore_s3 import S3Client
1615

1716
pytest_simcore_core_services_selection = ["postgres"]

0 commit comments

Comments
 (0)