File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
services/storage/src/simcore_service_storage/modules/celery Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -133,15 +133,15 @@ def get_task_status(
133133 def _get_completed_task_uuids (self , task_context : TaskContext ) -> set [TaskUUID ]:
134134 search_key = _CELERY_TASK_META_PREFIX + _build_task_id_prefix (task_context )
135135 backend_client = self ._celery_app .backend .client
136- if hasattr (backend_client , "keys" ) and (
137- keys := backend_client .keys (f"{ search_key } *" )
138- ):
139- return {
140- TaskUUID (
141- f" { key . decode ( _CELERY_TASK_ID_KEY_ENCODING ). removeprefix ( search_key + _CELERY_TASK_ID_KEY_SEPARATOR ) } "
142- )
143- for key in keys
144- }
136+ if hasattr (backend_client , "keys" ):
137+ if keys := backend_client .keys (f"{ search_key } *" ):
138+ return {
139+ TaskUUID (
140+ f" { key . decode ( _CELERY_TASK_ID_KEY_ENCODING ). removeprefix ( search_key + _CELERY_TASK_ID_KEY_SEPARATOR ) } "
141+ )
142+ for key in keys
143+ }
144+ return set ()
145145 if hasattr (backend_client , "cache" ):
146146 # NOTE: backend used in testing. It is a dict-like object
147147 found_keys = set ()
You can’t perform that action at this time.
0 commit comments