Skip to content

Commit 10fc877

Browse files
author
Andrei Neagu
committed
typo
1 parent 7cd3a23 commit 10fc877

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/service-library/src/servicelib/long_running_tasks/_redis_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def mark_task_for_removal(
126126
)
127127
)
128128

129-
async def is_maked_for_removal(self, task_id: TaskId) -> bool:
129+
async def is_marked_for_removal(self, task_id: TaskId) -> bool:
130130
result: bool = await handle_redis_returns_union_types(
131131
self._redis.hexists(self._get_key_to_remove(), task_id)
132132
)

packages/service-library/src/servicelib/long_running_tasks/task.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ async def get_task_status(
435435
436436
raises TaskNotFoundError if the task cannot be found
437437
"""
438-
if exclude_removed and await self._tasks_data.is_maked_for_removal(task_id):
438+
if exclude_removed and await self._tasks_data.is_marked_for_removal(task_id):
439439
raise TaskNotFoundError(task_id=task_id)
440440

441441
task_data = await self._get_tracked_task(task_id, with_task_context)
@@ -472,7 +472,7 @@ async def get_task_result(
472472
raises TaskNotFoundError if the task cannot be found
473473
raises TaskNotCompletedError if the task is not completed
474474
"""
475-
if await self._tasks_data.is_maked_for_removal(task_id):
475+
if await self._tasks_data.is_marked_for_removal(task_id):
476476
raise TaskNotFoundError(task_id=task_id)
477477

478478
tracked_task = await self._get_tracked_task(task_id, with_task_context)
@@ -502,7 +502,7 @@ async def remove_task(
502502
cancels and removes task
503503
raises TaskNotFoundError if the task cannot be found
504504
"""
505-
if await self._tasks_data.is_maked_for_removal(task_id):
505+
if await self._tasks_data.is_marked_for_removal(task_id):
506506
raise TaskNotFoundError(task_id=task_id)
507507

508508
tracked_task = await self._get_tracked_task(task_id, with_task_context)

packages/service-library/tests/long_running_tasks/test_long_running_tasks__store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ async def test_workflow(store: RedisStore, task_data: TaskData) -> None:
5252
# cancelled tasks
5353
assert await store.list_tasks_to_remove() == {}
5454

55-
assert await store.is_maked_for_removal(task_data.task_id) is False
55+
assert await store.is_marked_for_removal(task_data.task_id) is False
5656

5757
await store.mark_task_for_removal(task_data.task_id, task_data.task_context)
5858

59-
assert await store.is_maked_for_removal(task_data.task_id) is True
59+
assert await store.is_marked_for_removal(task_data.task_id) is True
6060

6161
assert await store.list_tasks_to_remove() == {
6262
task_data.task_id: task_data.task_context

0 commit comments

Comments
 (0)