Added scheduler to alert users on allocation revocation#322
Open
QuanMPhm wants to merge 1 commit into
Open
Conversation
QuanMPhm
commented
Jun 23, 2026
| date = datetime.now(timezone.utc) + timedelta(days=1) | ||
| date = date.replace( | ||
| hour=0, minute=0, second=0, microsecond=0 | ||
| ) # TODO: What time of day to run this job? |
Contributor
Author
There was a problem hiding this comment.
QuanMPhm
commented
Jun 23, 2026
| def remind_allocations_expired(): | ||
| today = datetime.now(timezone.utc) | ||
| reminder_dates = [today + timedelta(days=d) for d in REMINDER_SCHEDULE_DAYS] | ||
| status_to_remind = [ # TODO: Confirm these are the statuses we want alerted? |
Contributor
Author
There was a problem hiding this comment.
@joachimweyl @knikolla @naved001 What about current existing allocations that are in the soon-to-be-removed Active (Needs Renewal) status?
28ff498 to
3bbd183
Compare
Contributor
Author
|
@knikolla @naved001 I just now realized that Coldfront already has a system inplace for this, and we already have an email template for this in Is it fine for me to just modify the link email template and configure the appropriate coldfront setting? |
PIs and managers with allocations in the `Active` status that will expire in 30, 14, 7, and 2 days will receive an email reminder.
3bbd183 to
dbb2266
Compare
Contributor
Author
|
Updated this PR to do alerting for revocation instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #309. I have some questions down below