Blackout hours#141
Open
william-aaron-CFA wants to merge 4 commits intomainfrom
Open
Conversation
|
|
||
| #: 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): |
Contributor
Author
There was a problem hiding this comment.
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.
| if len(ace_table) - 5 <= sum(missing_selection): | ||
| if 8 <= _NOW.datetime.hour <= 22: | ||
| invalid = True | ||
| invalid = True |
Contributor
Author
There was a problem hiding this comment.
This conditional check has been moved to the check_alert_triggers function for clarity in lines 228-229
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.
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.