-
Notifications
You must be signed in to change notification settings - Fork 430
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
Change last_run_at=None when using disable tasks admin action #501
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR can you check the lint failure please? I will do some testing & thorough review before merge
Yes, I'll check out and request you soon. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also include release note entry please?
Yup, I guess you mean Changelog entry. right? 😉 |
thanks. feel free to send any follow up PR, if any regression happen |
PeriodicTask model's save method implements that when disabling task, it changes its
last_run_at
field to None.But
disable_tasks
in PeriodicTaskAdmin action. does not change periodic task'slast_run_at
attribute.Due to this behavior, Even if we disable some tasks using action, tasks runs immediatey as soon as task enabled.
To fix this issue, I suggest change
last_run_at
attribute to None when disable_tasks.Thanks!