File tree 4 files changed +9
-9
lines changed
director-v2/src/simcore_service_director_v2/modules
storage/src/simcore_service_storage
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async def _concurently_safe_acquire_client() -> DaskClient:
80
80
tasks_file_link_type = (
81
81
self .settings .COMPUTATIONAL_BACKEND_DEFAULT_CLUSTER_FILE_LINK_TYPE
82
82
)
83
- if cluster .type is ClusterTypeInModel .ON_DEMAND :
83
+ if cluster .type == ClusterTypeInModel .ON_DEMAND . value :
84
84
tasks_file_link_type = (
85
85
self .settings .COMPUTATIONAL_BACKEND_ON_DEMAND_CLUSTERS_FILE_LINK_TYPE
86
86
)
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class S3AccessError(StorageRuntimeError):
44
44
45
45
class S3BucketInvalidError (S3AccessError ):
46
46
code = "s3_bucket.invalid_error"
47
- msg_template : str = "The {bucket} is invalid"
47
+ msg_template : str = "The bucket ' {bucket}' is invalid"
48
48
49
49
50
50
class S3KeyNotFoundError (S3AccessError ):
Original file line number Diff line number Diff line change @@ -193,10 +193,9 @@ async def upload_file(request: web.Request) -> web.Response:
193
193
if query_params .file_size is None and not query_params .is_directory :
194
194
# return v1 response
195
195
assert len (links .urls ) == 1 # nosec
196
- return web .json_response (
197
- {"data" : {"link" : jsonable_encoder (links .urls [0 ], by_alias = True )}},
198
- dumps = json_dumps ,
199
- )
196
+ response = {"data" : {"link" : jsonable_encoder (links .urls [0 ], by_alias = True )}}
197
+ log .debug ("Returning v1 response: %s" , response )
198
+ return web .json_response (response , dumps = json_dumps )
200
199
201
200
# v2 response
202
201
abort_url = request .url .join (
@@ -226,7 +225,7 @@ async def upload_file(request: web.Request) -> web.Response:
226
225
),
227
226
),
228
227
)
229
-
228
+ log . debug ( "returning v2 response: %s" , response )
230
229
return jsonable_encoder (response , by_alias = True )
231
230
232
231
Original file line number Diff line number Diff line change @@ -805,12 +805,13 @@ async def _clean_expired_uploads(self):
805
805
list_of_expired_uploads = await db_file_meta_data .list_fmds (
806
806
conn , expired_after = now
807
807
)
808
+
809
+ if not list_of_expired_uploads :
810
+ return
808
811
_logger .debug (
809
812
"found following pending uploads: [%s]" ,
810
813
[fmd .file_id for fmd in list_of_expired_uploads ],
811
814
)
812
- if not list_of_expired_uploads :
813
- return
814
815
815
816
# try first to upload these from S3 (conservative)
816
817
updated_fmds = await logged_gather (
You can’t perform that action at this time.
0 commit comments