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

Cleaning up extra logging #4179

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions uber/tasks/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def send_automated_emails():
for model, query_func in AutomatedEmailFixture.queries.items():
log.info("Sending automated emails for " + model.__name__)
automated_emails = automated_emails_by_model.get(model.__name__, [])
log.info("Found " + str(len(automated_emails)) + " emails for " + model.__name__)
for automated_email in automated_emails:
if automated_email.currently_sending:
log.info(automated_email.ident + " is marked as currently sending")
Expand All @@ -189,11 +188,8 @@ def send_automated_emails():
session.commit()
unapproved_count = 0

log.info("Loading instances for " + automated_email.ident)
model_instances = query_func(session)
log.info("Finished loading instances")
for model_instance in model_instances:
log.info("Checking " + str(model_instance.id))
if model_instance.id not in automated_email.emails_by_fk_id:
if automated_email.would_send_if_approved(model_instance):
if automated_email.approved or not automated_email.needs_approval:
Expand Down
Loading