Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task Queue Redesign #168

Merged
merged 10 commits into from
Aug 30, 2024
Merged

Task Queue Redesign #168

merged 10 commits into from
Aug 30, 2024

Conversation

movchan74
Copy link
Contributor

@movchan74 movchan74 commented Aug 27, 2024

Summary:
This Pull Request focuses on redesigning the task queue to improve how tasks are managed and executed, specifically by integrating them directly with RequestHandler calls. The update also includes enhancements to task management and testing.

Key Changes:

  1. Task Queue Redesign: The task queue now operates directly on RequestHandler calls instead of using asyncio tasks, streamlining task execution.
  2. Enhanced Request Handling: The call_endpoint method in RequestHandler has been refactored to execute_task, which now fully handles task execution, including running the endpoint and updating the task status.
  3. Task Retry Logic: A num_retries parameter has been added to tasks, allowing for configurable retry attempts.
  4. Task Repository Testing: New tests have been added to ensure the reliability and accuracy of the task repository's functionality.

Closes: #166

@movchan74 movchan74 marked this pull request as ready for review August 27, 2024 09:23
Copy link
Contributor

@HRashidi HRashidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments to be reviewed

aana/api/request_handler.py Show resolved Hide resolved
aana/storage/models/task.py Show resolved Hide resolved
aana/storage/repository/task.py Outdated Show resolved Hide resolved
aana/deployments/task_queue_deployment.py Show resolved Hide resolved
aana/deployments/task_queue_deployment.py Show resolved Hide resolved
aana/configs/settings.py Show resolved Hide resolved
aana/deployments/task_queue_deployment.py Show resolved Hide resolved
Copy link
Contributor

@HRashidi HRashidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@movchan74 movchan74 merged commit 1b0737f into main Aug 30, 2024
6 checks passed
@movchan74 movchan74 deleted the task_queue_fixes branch August 30, 2024 11:49
@movchan74 movchan74 restored the task_queue_fixes branch August 30, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Task Queue Bugs
2 participants