Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ repos:
- id: check-toml
- id: check-yaml
- id: check-added-large-files
exclude: uv.lock
- id: end-of-file-fixer

- repo: https://github.com/crate-ci/typos
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

3 changes: 3 additions & 0 deletions examples/example_with_schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"kwargs": {}, # type: dict[str, Any] | None, can be omitted.
"labels": {}, # type: dict[str, Any] | None, can be omitted.
},
{
"interval": 10, # type: int | timedelta | None
},
],
)
async def best_task_ever() -> None:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "taskiq-postgres"
version = "0.6.0"
version = "0.6.1"
description = "PostgreSQL integration for taskiq"
summary = "PostgreSQL integration for taskiq"
readme = "README.md"
Expand Down Expand Up @@ -33,7 +33,7 @@ authors = [
]
requires-python = ">=3.10,<3.15"
dependencies = [
"taskiq>=0.11.18",
"taskiq>=0.12.0",
]

[project.urls]
Expand Down
1 change: 1 addition & 0 deletions src/taskiq_pg/_internal/schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def extract_scheduled_tasks_from_broker(self) -> list[ScheduledTask]:
"schedule_id": str(uuid.uuid4()),
"cron": schedule.get("cron", None),
"cron_offset": schedule.get("cron_offset", None),
"interval": schedule.get("interval", None),
"time": schedule.get("time", None),
},
)
Expand Down
1 change: 1 addition & 0 deletions src/taskiq_pg/aiopg/schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ async def get_schedules(self) -> list["ScheduledTask"]:
"cron": schedule["cron"],
"cron_offset": schedule["cron_offset"],
"time": schedule["time"],
"interval": schedule["interval"],
},
),
)
Expand Down
1 change: 1 addition & 0 deletions src/taskiq_pg/asyncpg/schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async def get_schedules(self) -> list["ScheduledTask"]:
"cron": schedule["cron"],
"cron_offset": schedule["cron_offset"],
"time": schedule["time"],
"interval": schedule["interval"],
},
),
)
Expand Down
1 change: 1 addition & 0 deletions src/taskiq_pg/psqlpy/schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ async def get_schedules(self) -> list["ScheduledTask"]:
"cron": schedule["cron"],
"cron_offset": schedule["cron_offset"],
"time": schedule["time"],
"interval": schedule["interval"],
},
),
)
Expand Down
1 change: 1 addition & 0 deletions src/taskiq_pg/psycopg/schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async def get_schedules(self) -> list["ScheduledTask"]:
"cron": schedule["cron"],
"cron_offset": schedule["cron_offset"],
"time": schedule["time"],
"interval": schedule["interval"],
},
),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_schedule_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async def test_when_call_add_schedule__then_schedule_creates(
schedule_source_class: type[PSQLPyScheduleSource | AiopgScheduleSource | AsyncpgScheduleSource],
) -> None:
# Given
new_schedule = ScheduledTaskFactory.build(task_name="tests:added_schedule", cron="*/5 * * * *")
new_schedule = ScheduledTaskFactory.build(task_name="tests:added_schedule", cron="*/5 * * * *", interval=None)
async with _get_schedule_source(schedule_source_class, broker_with_scheduled_tasks, pg_dsn) as schedule_source:
await schedule_source.startup()

Expand Down
707 changes: 673 additions & 34 deletions uv.lock

Large diffs are not rendered by default.