Skip to content

Feat/queues and handlers - #5

Merged
Muizzyranking merged 14 commits into
mainfrom
feat/queues-and-handlers
Jun 12, 2026
Merged

Feat/queues and handlers#5
Muizzyranking merged 14 commits into
mainfrom
feat/queues-and-handlers

Conversation

@Muizzyranking

Copy link
Copy Markdown
Owner

Summary

Provide a brief overview of the changes in this PR.

Type of Change

  • [x ] New Feature
  • Bug Fix
  • Refactor
  • Chore (dependencies, documentation, etc.)
  • Test Addition/Update

Key Changes

Summary

This PR implements the core job processing engine and scheduling logic. It introduces a
modular queue system (supporting Priority and Timing Wheel algorithms), a flexible job
handling framework, and the essential domain services for DAG management, Dead Letter
Queues (DLQ), and alerting.

Type of Change

  • New Feature
  • Refactor (Modularizing queue and handler interfaces)

Key Changes

  • Queue System: Implemented a base QueueInterface with two concrete implementations:
  • HeapQ: For priority-based scheduling.
  • TimingWheel: Optimized for delayed job execution.
  • Job Handlers: Created handlers for Webhook, Email, and Log processing, including a utility for dynamic payload parsing.
  • Domain Services:
    • JobService: Central interface for job lifecycle management.
    • DAGService: Logic for managing job dependencies and execution order.
    • DLQService: Management for failed jobs/dead letter queues.
    • SettingService: Centralized application configuration management.
  • Alerting: Implemented an AlertService with HTML email templates for DLQ
    threshold notifications.
  • Schemas: Comprehensive Pydantic models for Job definitions and states.

Database Migrations

  • This PR includes database migrations (alembic/versions/).
  • Migrations have been tested locally.

Testing Strategy

  • Manual verification of queue logic (HeapQ and Timing Wheel).
  • Payload parsing utilities verified against various job schemas.
  • Email template rendering tested locally.

Checklist

  • Code follows the project's style guidelines.
  • uv.lock and pyproject.toml are updated.
  • Documentation (in docs/) has been updated if necessary.
  • I have verified the changes in a local environment.- [ ] List major architectural or logic changes.
  • Mention new database models or schema updates.
  • Describe any new API endpoints or services.

Database Migrations

  • This PR includes database migrations (alembic/versions/).
  • Migrations have been tested locally.

Testing Strategy

  • Unit tests added/updated.
  • Integration tests added/updated.
  • Manual testing performed.

Checklist

  • Code follows the project's style guidelines.
  • uv.lock and pyproject.toml are updated.
  • Documentation (in docs/) has been updated if necessary.
  • I have verified the changes in a local environment.

Screenshots / Console Logs

(Optional: Add any relevant visual evidence of the change)

@Muizzyranking
Muizzyranking merged commit 461c64f into main Jun 12, 2026
1 check passed
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.

1 participant