Skip to content

Conversation

@danfimov
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 17, 2025 16:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds optional methods for schedule sources to enable runtime schedule management. The key changes include adding add_schedule, delete_schedule, and post_send methods to schedule source implementations, refactoring shared code to the base class, and improving SQL query safety.

Key changes:

  • Added add_schedule and delete_schedule methods to all schedule source implementations
  • Moved duplicated schedule extraction logic from individual implementations to base class
  • Enhanced SQL security using parameterized queries with proper identifier handling

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/taskiq_pg/_internal/schedule_source.py Added shared extract_scheduled_tasks_from_broker method to base class
src/taskiq_pg/psycopg/schedule_source.py Implemented add/delete/post_send methods with SQL injection protection
src/taskiq_pg/psqlpy/schedule_source.py Implemented add/delete/post_send methods
src/taskiq_pg/asyncpg/schedule_source.py Implemented add/delete/post_send methods
src/taskiq_pg/aiopg/schedule_source.py Implemented add/delete/post_send methods
src/taskiq_pg/*/queries.py Added DELETE_SCHEDULE_QUERY constant
tests/integration/test_schedule_source.py Added integration tests for new schedule management methods
docs/tutorial/schedule_source.md Added documentation for runtime schedule management
pyproject.toml Added polyfactory test dependency and enabled pydocstyle

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@danfimov danfimov force-pushed the add-optional-methods-for-schedule-source branch from c8105cc to 91ce7de Compare October 17, 2025 16:26
@danfimov danfimov merged commit fa24461 into main Oct 17, 2025
4 checks passed
@danfimov danfimov deleted the add-optional-methods-for-schedule-source branch October 17, 2025 16:28
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