Skip to content

Commit b23966e

Browse files
fix exists
1 parent 8783d33 commit b23966e

File tree

1 file changed

+3
-1
lines changed
  • services/storage/src/simcore_service_storage/modules/celery/backends

1 file changed

+3
-1
lines changed

services/storage/src/simcore_service_storage/modules/celery/backends/_redis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ async def get_task_uuids(self, task_context: TaskContext) -> set[TaskUUID]:
2727
return keys
2828

2929
async def task_exists(self, task_id: TaskID) -> bool:
30-
return await self._redis_client_sdk.redis.exists(task_id) > 0
30+
n = await self._redis_client_sdk.redis.exists(task_id)
31+
assert isinstance(n, int) # nosec
32+
return n > 0
3133

3234
async def set_task(self, task_id: TaskID, task_data: TaskData) -> None:
3335
await self._redis_client_sdk.redis.set(

0 commit comments

Comments
 (0)