mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #236 from chrismeyersfsu/fix-inventory_status_propogation
inherit child job finish status
This commit is contained in:
commit
2029bfb9b1
@ -1143,10 +1143,9 @@ class InventorySource(UnifiedJobTemplate, InventorySourceOptions):
|
||||
return self.current_job.status
|
||||
elif not self.last_job:
|
||||
return 'never updated'
|
||||
elif self.last_job_failed:
|
||||
return 'failed'
|
||||
# inherit the child job status
|
||||
else:
|
||||
return 'successful'
|
||||
return self.last_job.status
|
||||
else:
|
||||
return 'none'
|
||||
|
||||
|
||||
@ -253,12 +253,16 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
||||
return self.current_job.status
|
||||
elif not self.last_job:
|
||||
return 'never updated'
|
||||
# inherit the child job status on failure
|
||||
elif self.last_job_failed:
|
||||
return 'failed'
|
||||
return self.last_job.status
|
||||
# Even on a successful child run, a missing project path overides
|
||||
# the successful status
|
||||
elif not self.get_project_path():
|
||||
return 'missing'
|
||||
# Return the successful status
|
||||
else:
|
||||
return 'successful'
|
||||
return self.last_job.status
|
||||
elif not self.get_project_path():
|
||||
return 'missing'
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user