Skip to content

Don't run MonthlyKeyMetricsReport if there are no recipients#9362

Merged
n1zyy merged 3 commits intomainfrom
mattw/mkmr-skip-no-email
Oct 12, 2023
Merged

Don't run MonthlyKeyMetricsReport if there are no recipients#9362
n1zyy merged 3 commits intomainfrom
mattw/mkmr-skip-no-email

Conversation

@n1zyy
Copy link
Contributor

@n1zyy n1zyy commented Oct 11, 2023

Check if there are any recipients for the email report, and bail out before generating the report if there are none. This should save dozens of CPU cycles.

Note: This will also mean we don't do the upload to S3. I am operating on the assumption that if there are no email recipients, it's in an environment where we don't care about the report and thus don't need to upload it to S3 or run it at all. We should reject this PR if that's not true.

🎫 Ticket

None; can be linked to my work on LG-10812 if needed.

@n1zyy n1zyy requested a review from a team October 11, 2023 20:00
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

I don't think we strictly need this but the code LGTM

@n1zyy n1zyy merged commit 84701cb into main Oct 12, 2023
@n1zyy n1zyy deleted the mattw/mkmr-skip-no-email branch October 12, 2023 20:33
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.

3 participants