Skip to content

Commit af8e683

Browse files
🐛 Fix bug (#7440)
1 parent 653b60a commit af8e683

File tree

1 file changed

+9
-9
lines changed
  • services/storage/src/simcore_service_storage/modules/celery

1 file changed

+9
-9
lines changed

services/storage/src/simcore_service_storage/modules/celery/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)