fix: use interval to create ScheduledTask#27
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the interval field in ScheduledTask objects, enabling interval-based scheduling alongside the existing cron and time-based scheduling. The change updates the minimum taskiq dependency to version 0.12.0, which introduced the interval field. All four PostgreSQL driver implementations (asyncpg, psycopg, psqlpy, and aiopg) are updated consistently to handle the new field when storing and retrieving schedules from the database.
Key changes:
- Added
intervalfield extraction and storage across all schedule source implementations - Updated dependency requirement from taskiq>=0.11.18 to taskiq>=0.12.0
- Removed MANIFEST.in file in favor of automatic package data inclusion by uv_build
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/taskiq_pg/asyncpg/schedule_source.py |
Added interval field to ScheduledTask validation when fetching schedules from database |
src/taskiq_pg/psycopg/schedule_source.py |
Added interval field to ScheduledTask validation when fetching schedules from database |
src/taskiq_pg/psqlpy/schedule_source.py |
Added interval field to ScheduledTask validation when fetching schedules from database |
src/taskiq_pg/aiopg/schedule_source.py |
Added interval field to ScheduledTask validation when fetching schedules from database |
src/taskiq_pg/_internal/schedule_source.py |
Added interval field extraction when parsing schedules from broker task labels |
tests/integration/test_schedule_source.py |
Updated test to explicitly set interval=None for cron-based schedule |
pyproject.toml |
Bumped minimum taskiq version from 0.11.18 to 0.12.0 |
examples/example_with_schedule_source.py |
Added example schedule entry demonstrating interval-based scheduling with inline comment formatting issue |
.pre-commit-config.yaml |
Excluded uv.lock from large file checks |
MANIFEST.in |
Removed file as uv_build automatically includes package data like py.typed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Closes #26