mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
support distributed project updates
This commit is contained in:
parent
306562cd67
commit
5fa5d4b34b
@ -59,7 +59,7 @@ class DependencyGraph(object):
|
||||
return True
|
||||
|
||||
# TODO: Other finished, failed cases? i.e. error ?
|
||||
if latest_project_update['status'] == 'failed':
|
||||
if latest_project_update['status'] in ['failed', 'canceled']:
|
||||
return True
|
||||
|
||||
'''
|
||||
@ -89,7 +89,7 @@ class DependencyGraph(object):
|
||||
return True
|
||||
|
||||
# TODO: Other finished, failed cases? i.e. error ?
|
||||
if latest_inventory_update['status'] == 'failed':
|
||||
if latest_inventory_update['status'] in ['failed', 'canceled']:
|
||||
return True
|
||||
|
||||
'''
|
||||
|
||||
@ -82,6 +82,14 @@ class ProjectUpdateDict(PartialModelDict):
|
||||
def task_impact(self):
|
||||
return 10
|
||||
|
||||
@classmethod
|
||||
def filter_partial(cls, status=[]):
|
||||
kv = {
|
||||
'status__in': status,
|
||||
'job_type': 'check',
|
||||
}
|
||||
return [cls(o) for o in cls.model.objects.filter(**kv).values(*cls.get_db_values())]
|
||||
|
||||
class ProjectUpdateLatestDict(ProjectUpdateDict):
|
||||
FIELDS = (
|
||||
'id', 'status', 'project_id', 'created', 'finished',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user