Skip to content

Commit

Permalink
Reverts to using logger for logging incident cost updates to reduce n…
Browse files Browse the repository at this point in the history
…umber of events in the incident timeline (#2393)
  • Loading branch information
mvilanova authored Aug 1, 2022
1 parent d290523 commit 61781e2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/dispatch/incident_cost/scheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from dispatch.database.core import SessionLocal
from dispatch.decorators import scheduled_project_task
from dispatch.event import service as event_service
from dispatch.incident import service as incident_service
from dispatch.incident.enums import IncidentStatus
from dispatch.incident_cost.models import IncidentCostCreate
Expand Down Expand Up @@ -78,12 +77,7 @@ def calculate_incidents_response_cost(db_session: SessionLocal, project: Project
db_session.add(incident)
db_session.commit()

event_service.log(
db_session=db_session,
source="Dispatch Core App",
description=f"The incident's response cost has been updated to ${amount:,.2f}",
incident_id=incident.id,
)
log.debug(f"{incident.name}'s response cost has been updated to ${amount:,.2f}")

except Exception as e:
# we shouldn't fail to update all incidents when one fails
Expand Down

0 comments on commit 61781e2

Please sign in to comment.