diff options
author | Chris Meyers <chris.meyers.fsu@gmail.com> | 2017-06-29 19:27:17 +0200 |
---|---|---|
committer | Chris Meyers <chris.meyers.fsu@gmail.com> | 2017-06-30 15:54:08 +0200 |
commit | 668bce8212f5b45360a31f9cbd1928db16a35283 (patch) | |
tree | 8e1219e398fa7d3d61d5fdf3c3254154456ad1f2 | |
parent | Merge pull request #6814 from jlmitch5/loggingProtocolCtit (diff) | |
download | awx-668bce8212f5b45360a31f9cbd1928db16a35283.tar.xz awx-668bce8212f5b45360a31f9cbd1928db16a35283.zip |
fix job launch deadlock
* This both fixes the deadlock problem and a logic problem. We shouldn't
set the job's job_template current_job to pending jobs.
-rw-r--r-- | awx/main/models/unified_jobs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py index 0142dd957a..b7b5ca8073 100644 --- a/awx/main/models/unified_jobs.py +++ b/awx/main/models/unified_jobs.py @@ -712,7 +712,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique result = super(UnifiedJob, self).save(*args, **kwargs) # If status changed, update the parent instance. - if self.status != status_before: + if self.status != status_before and self.status != 'pending': self._update_parent_instance() # Done. |