Skip to content
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

#1045 Remove limited lookback window on Ecocounter outages alert #1046

Conversation

gabrielwol
Copy link
Collaborator

@gabrielwol gabrielwol commented Aug 27, 2024

What this pull request accomplishes:

  • rewrite ongoing outage query for Ecocounter to use last_active columns and remove lookback limit.

Issue(s) this solves:

What, in particular, needs to reviewed:

Nothing, see successful test in #airflow_pipelines-dev!

What needs to be done by a sysadmin after this PR is merged

Pull into data_scripts

@gabrielwol gabrielwol self-assigned this Aug 27, 2024
@gabrielwol gabrielwol linked an issue Aug 27, 2024 that may be closed by this pull request
@gabrielwol gabrielwol changed the title #1045 restructure to use "last_active" columns #1045 Remove limited lookback window on Ecocounter outages alert Aug 27, 2024
last_active
FROM ecocounter.sites
WHERE
last_active < CURRENT_DATE - 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed to CURRENT_DATE - 1 (recommended by postgres docs 👀) instead of basing it off of ds, because this way it will be more accurate if task is rerun on a different date.

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense!

Copy link
Collaborator

@chmnata chmnata left a comment

Choose a reason for hiding this comment

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

:gabe-approved:

@gabrielwol gabrielwol merged commit d49fd1b into master Aug 29, 2024
4 checks passed
@gabrielwol gabrielwol deleted the 1045-remove-lookback-limit-from-ecocounter-outage-notification branch August 29, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove lookback limit from Ecocounter outage notification
2 participants