Define a DEFAULT_QUEUE_NAME

This commit is contained in:
Yanis Guenane
2021-05-17 18:06:00 +02:00
committed by Shane McDonald
parent d3b20e6585
commit 82c4f6bb88
10 changed files with 39 additions and 34 deletions

View File

@@ -33,7 +33,7 @@ class HostManager(models.Manager):
- Only consider results that are unique
- Return the count of this query
"""
return self.order_by().exclude(inventory_sources__source='tower').values('name').distinct().count()
return self.order_by().exclude(inventory_sources__source=settings.DEFAULT_QUEUE_NAME).values('name').distinct().count()
def org_active_count(self, org_id):
"""Return count of active, unique hosts used by an organization.