-
Couldn't load subscription status.
- Fork 471
Keep meta data around task, even after disabled. #352
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -574,8 +574,6 @@ def save(self, *args, **kwargs): | |
| self.routing_key = self.routing_key or None | ||
| self.queue = self.queue or None | ||
| self.headers = self.headers or None | ||
| if not self.enabled: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this create any regreassion? |
||
| self.last_run_at = None | ||
| self._clean_expires() | ||
| self.validate_unique() | ||
| super(PeriodicTask, self).save(*args, **kwargs) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,7 +125,6 @@ def is_due(self): | |
| if self.model.one_off and self.model.enabled \ | ||
| and self.model.total_run_count > 0: | ||
| self.model.enabled = False | ||
| self.model.total_run_count = 0 # Reset | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it backward-incompatible? |
||
| self.model.no_changes = False # Mark the model entry as changed | ||
| self.model.save() | ||
| return schedules.schedstate(False, None) # Don't recheck | ||
|
|
||
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.
[nitpick] Insert a space after the comma between
'last_run_at'and'total_run_count'for consistent formatting.