-
Notifications
You must be signed in to change notification settings - Fork 97
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
Feature request: Implement soft deletion on remove_job, to save DjangoJobExecution #113
Comments
We could perhaps introduce a Another aspect to consider is implementing a custom model manager that provides something like an |
I think this would also solve my issue that I get a FOREIGN KEY error when django-apscheduler tries to make a DjangoJobExecution object for the first time even though my job has already been removed by apscheduler.. |
That should already be fixed as part of #116 and #121. Maybe try checking out the master branch to see if that works for you. |
One issue with implementing a 'soft delete' feature like this is that, if a job is created that has the same name but vastly different semantic meaning and functionality than a previously deleted job, then linking the old From a user perspective it will seem like this brand new job has in fact been run many times in the past, even though it was just created. Enforcing unique and non-repeating job names might go some way towards solving the above, but placing the burden of having to continuously come up with creative job names on the user is probably not ideal. Alternatively, changing the Django models so that Bottom line: how do we know which historical |
Perhaps adding a version field of DjangoJob would be the ideal option. We can determine the version number of a job function by hashing its source code. |
Implement soft deletion on remove_job, to save DjangoJobExecution
Expected behavior
After execution "date" job result of this execution stays in DjangoJobExecution table.
The text was updated successfully, but these errors were encountered: