mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 13:27:40 -02:30
Merge pull request #6377 from chrismeyersfsu/fix-register_queue_race
serialize register_queue Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -31,7 +31,6 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
|
|
||||||
def get_create_update_instance_group(self, queuename, instance_percent, instance_min):
|
def get_create_update_instance_group(self, queuename, instance_percent, instance_min):
|
||||||
ig = InstanceGroup.objects.filter(name=queuename)
|
|
||||||
created = False
|
created = False
|
||||||
changed = False
|
changed = False
|
||||||
|
|
||||||
@@ -98,7 +97,7 @@ class Command(BaseCommand):
|
|||||||
if options.get('hostnames'):
|
if options.get('hostnames'):
|
||||||
hostname_list = options.get('hostnames').split(",")
|
hostname_list = options.get('hostnames').split(",")
|
||||||
|
|
||||||
with advisory_lock('instance_group_registration_{}'.format(queuename)):
|
with advisory_lock('instance_group_registration'):
|
||||||
changed2 = False
|
changed2 = False
|
||||||
changed3 = False
|
changed3 = False
|
||||||
(ig, created, changed1) = self.get_create_update_instance_group(queuename, inst_per, inst_min)
|
(ig, created, changed1) = self.get_create_update_instance_group(queuename, inst_per, inst_min)
|
||||||
|
|||||||
Reference in New Issue
Block a user