Merge pull request #236 from chrismeyersfsu/fix-inventory_status_propogation

inherit child job finish status
This commit is contained in:
Chris Meyers 2015-05-22 14:31:05 -04:00
commit 2029bfb9b1
2 changed files with 8 additions and 5 deletions

View File

@ -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'

View File

@ -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: