Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Schedule deletion depending if schedule type is Schedule.ONCE or not #710

Open
alanoe opened this issue Dec 10, 2022 · 0 comments

Comments

@alanoe
Copy link

alanoe commented Dec 10, 2022

A Schedule instance is only deleted after the task is queued if its scheduled type is Schedule.ONCE and repeats == -1, which is non intuitive to the user.

  • the online documentation says that the task will be queued indefinitely if repeats == -1 (I assume that's "always" means), but that's not true for tasks with schedule type Schedule.ONCE. Why do we even need a Schedule.ONCE schedule type if the user can create a Schedule instance with repeats=1 ? Having both Schedule.ONCE as a schedule type and the repeats argument set to a value different that 1 in the same task doesn't make sense.
  • Schedule instances should be consistently deleted when the task is queued, regardless of schedule type. If the library wants to parameterize the Schedule deletion, it could be done consistently with an argument like delete_after_queued.
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

No branches or pull requests

1 participant