Updates to a given inventory should happen serially

This commit is contained in:
Jim Ladd
2020-05-19 14:42:11 -07:00
parent 49c0b77c60
commit 05ac2c1ec2

View File

@@ -874,7 +874,6 @@ class Command(BaseCommand):
Load inventory from in-memory groups to the database, overwriting or
merging as appropriate.
'''
with advisory_lock('inventory_{}_update'.format(self.inventory.id)):
# FIXME: Attribute changes to superuser?
# Perform __in queries in batches (mainly for unit tests using SQLite).
self._batch_size = 500
@@ -998,6 +997,7 @@ class Command(BaseCommand):
raise CommandError('invalid regular expression for --host-filter')
begin = time.time()
with advisory_lock('inventory_{}_update'.format(self.inventory_id)):
self.load_inventory_from_database()
try: