mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
support distributed project updates
This commit is contained in:
@@ -59,7 +59,7 @@ class DependencyGraph(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
# TODO: Other finished, failed cases? i.e. error ?
|
# TODO: Other finished, failed cases? i.e. error ?
|
||||||
if latest_project_update['status'] == 'failed':
|
if latest_project_update['status'] in ['failed', 'canceled']:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@@ -89,7 +89,7 @@ class DependencyGraph(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
# TODO: Other finished, failed cases? i.e. error ?
|
# TODO: Other finished, failed cases? i.e. error ?
|
||||||
if latest_inventory_update['status'] == 'failed':
|
if latest_inventory_update['status'] in ['failed', 'canceled']:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -82,6 +82,14 @@ class ProjectUpdateDict(PartialModelDict):
|
|||||||
def task_impact(self):
|
def task_impact(self):
|
||||||
return 10
|
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):
|
class ProjectUpdateLatestDict(ProjectUpdateDict):
|
||||||
FIELDS = (
|
FIELDS = (
|
||||||
'id', 'status', 'project_id', 'created', 'finished',
|
'id', 'status', 'project_id', 'created', 'finished',
|
||||||
|
|||||||
Reference in New Issue
Block a user