Skip to content

Added scheduler to alert users on allocation revocation#322

Open
QuanMPhm wants to merge 1 commit into
nerc-project:mainfrom
QuanMPhm:309/expiration_reminder
Open

Added scheduler to alert users on allocation revocation#322
QuanMPhm wants to merge 1 commit into
nerc-project:mainfrom
QuanMPhm:309/expiration_reminder

Conversation

@QuanMPhm

Copy link
Copy Markdown
Contributor

Closes #309. I have some questions down below

@QuanMPhm QuanMPhm requested review from knikolla and naved001 June 23, 2026 19:07
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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joachimweyl @knikolla @naved001 What about current existing allocations that are in the soon-to-be-removed Active (Needs Renewal) status?

@QuanMPhm QuanMPhm force-pushed the 309/expiration_reminder branch from 28ff498 to 3bbd183 Compare June 23, 2026 19:26
@QuanMPhm

Copy link
Copy Markdown
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 coldfront-nerc. Seems like we will still need to do our own thing for revocation, or to update Coldfront.

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.
@QuanMPhm QuanMPhm force-pushed the 309/expiration_reminder branch from 3bbd183 to dbb2266 Compare June 24, 2026 20:22
@QuanMPhm

Copy link
Copy Markdown
Contributor Author

Updated this PR to do alerting for revocation instead

@QuanMPhm QuanMPhm changed the title Added scheduler to alert users on allocation expiration Added scheduler to alert users on allocation revocation Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement new scheduling of reminders for allocation expiration

1 participant