AC-990 Make job event filtering by host work even when not capturing hosts M2M. Also fix unit tests to skip checking hosts M2M.

This commit is contained in:
Chris Church
2014-02-06 15:07:37 -05:00
parent 4c38b05f90
commit 11d8387120
5 changed files with 38 additions and 21 deletions

View File

@@ -756,7 +756,8 @@ class JobEvent(BaseModel):
self.update_parent_failed_and_changed()
# FIXME: The update_hosts() call (and its queries) are the current
# performance bottleneck....
#self.update_hosts()
if getattr(settings, 'CAPTURE_JOB_EVENT_HOSTS', False):
self.update_hosts()
self.update_host_summary_from_stats()
def update_parent_failed_and_changed(self):