Strange behavior for interrupt_tasks and timeout_tasks
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by locating the interrupt_tasks and timeout_tasks implementations and compare their return and exception behavior. Determine the intended outcome for failed or partially processed tasks, then add coverage showing the chosen behavior is consistent and complete.
Written by the indexing model from the issue text.
Description
The code for interrupt_tasks and timeout_tasks are very similar.
def timeout_tasks(request, task_list):
result = True
for task_id in task_list:
task = Task.objects.get_and_verify(task_id=task_id, worker=request.worker)
if task:
try:
task.timeout_task(recursive=True)
except:
raise
result = False
return result
The strange part is the result variable, this function only returns True, if for some reason task.timeout_task raises an error result = False is never reached because it re-raises the error.
Some options available for fixing this:
- Do not return anything and re-raise
- Do not re-raise and return False
- Do not re-raise and return the actual count of tasks changed. If the input was 10 tasks but only 5 were interrupted return the number 5.
- Dominant language
- Python
- Stars
- 16
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from release-engineering/kobo
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
release-engineering/kobo#270 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
release-engineering/kobo#269 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
release-engineering/kobo#265 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
release-engineering/kobo#238 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
release-engineering/kobo#205 ·
All issues in release-engineering/kobo
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100