Skip to content

Schedule source shouldn't delete existing schedules during startup #65

Description

@danfimov

taskiq-postgres version

0.9.0

Python version

Python 3.11 or lower

PostgreSQL driver

asyncpg

PostgreSQL version

All

What happened?

AsyncpgScheduleSource.startup() truncates ALL schedules — dynamic schedules added via add_schedule() can't survive a restart when mixed with label crons

Expected behavior

We should not touch at least dynamic schedules.

I see two potential solutions here:

  • mark dynamic / static schedules in database and delete only static onces
  • add flag to just skip all logic about truncate + recreate at once.

Steps to reproduce

Just call startup() + add schedule + restart broker with schedule source

Minimal code example

Relevant log output

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions