-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add changes to activate cron job that deletes old applications 7 days after role appointment is done and saved #795
base: development
Are you sure you want to change the base?
Conversation
…ys after role appointment is done and saved
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.
Any idea why the CRON-job might not be invoked by django-kronos
, @anandmatt?
).exclude( | ||
status='appointed' | ||
).filter( | ||
status='turned_down' |
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.
The change to remove only turned_down applications is good, because currently, it expects that applications are appointed within a week of the application end date, which is not always the case. The status is set to turned_down only when they have been appointed.
@@ -99,3 +100,4 @@ def save(self): | |||
if not created: | |||
appl.status = 'appointed' | |||
appl.save() | |||
cron.remove_old_applications() |
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.
So a CRON-job is not supposed to be invoked manually, by definition. Unless there is some issue with django-kronos
not installing the CRON-jobs correctly, I don't think there is any problem in terms of remove_old_applications
not being called. The crontab on the server looks fine. So I think the change to invoke it without django-kronos
should be removed.
Description of the Change
Cron job that was supposed to delete old applications had no implementation. Changes done to call this cron job to delete old applications that were turned down, 7 days after a role has been appointed and saved.
Applicable Issues
Fixes issue #786
feature