##// END OF EJS Templates
events: do not fail when handling events for removed applications
ergo -
Show More
@@ -114,6 +114,11 b' class Event(Base, BaseModel):'
114 event_types = [Event.types['error_report_alert'],
114 event_types = [Event.types['error_report_alert'],
115 Event.types['slow_report_alert']]
115 Event.types['slow_report_alert']]
116 app = Resource.by_resource_id(self.resource_id)
116 app = Resource.by_resource_id(self.resource_id)
117 # if app was deleted close instantly

test

aadf

118 if not app:
119 self.close()
120 return
121
117 if self.event_type in event_types:
122 if self.event_type in event_types:
118 total = ReportStatService.count_by_type(
123 total = ReportStatService.count_by_type(
119 self.event_type, self.resource_id, since_when)
124 self.event_type, self.resource_id, since_when)
General Comments 1
Approved

approved

You need to be logged in to leave comments. Login now