Skip to content

Blackout hours#141

Open
william-aaron-CFA wants to merge 4 commits intomainfrom
blackout_hours
Open

Blackout hours#141
william-aaron-CFA wants to merge 4 commits intomainfrom
blackout_hours

Conversation

@william-aaron-CFA
Copy link
Copy Markdown
Contributor

This PR implements a set of blackout hours for the ACE P3 alert, during which no ACE P3 alert will be sent to the email distribution lists. Additionally, this PR also corrects a previous blackout hours implementation in order to specify the target time range with respect to eastern time instead of UTC.

@william-aaron-CFA william-aaron-CFA self-assigned this May 6, 2026
@william-aaron-CFA william-aaron-CFA added the enhancement New feature or request label May 6, 2026
Comment thread ACE/Scripts/alert_ace.py

#: Check for P3 alert trigger
if ace_p3["val"] > ACE_P3_LIMIT:
if (ace_p3["val"] > ACE_P3_LIMIT) and not (1 <= (_NOW_EASTERN.hour) <= 5):
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.

Note that the numerical calculation for determining the ACE P3 two-hour fluence remains unaffected by this PR. The check for the limit trigger is still able to pass, while the additional conditional statement will prevent the alert from being recorded and email being sent between 1 and 5 am.

After 5 am, if the alert trigger conditions are still met, then the alert will proceed as normal.

Comment thread ACE/Scripts/alert_ace.py
if len(ace_table) - 5 <= sum(missing_selection):
if 8 <= _NOW.datetime.hour <= 22:
invalid = True
invalid = True
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.

This conditional check has been moved to the check_alert_triggers function for clarity in lines 228-229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant