diff --git a/awxkit/awxkit/api/pages/api.py b/awxkit/awxkit/api/pages/api.py index cd600d9dc4..2fcc62648a 100644 --- a/awxkit/awxkit/api/pages/api.py +++ b/awxkit/awxkit/api/pages/api.py @@ -275,7 +275,13 @@ class ApiV2(base.Base): # When creating a project, we need to wait for its # first project update to finish so that associated # JTs have valid options for playbook names - _page.wait_until_completed() + try: + _page.wait_until_completed(timeout=300) + except AssertionError: + # If the project update times out, try to + # carry on in the hopes that it will + # finish before it is needed. + pass else: # If we are an existing project and our scm_tpye is not changing don't try and import the local_path setting if asset['natural_key']['type'] == 'project' and 'local_path' in post_data and _page['scm_type'] == post_data['scm_type']: diff --git a/awxkit/awxkit/api/pages/schedules.py b/awxkit/awxkit/api/pages/schedules.py index 3ff9e1c0bb..1fa34c81e6 100644 --- a/awxkit/awxkit/api/pages/schedules.py +++ b/awxkit/awxkit/api/pages/schedules.py @@ -1,6 +1,7 @@ from contextlib import suppress -from awxkit.api.pages import SystemJobTemplate +from awxkit.api.pages import JobTemplate, SystemJobTemplate, Project, InventorySource +from awxkit.api.pages.workflow_job_templates import WorkflowJobTemplate from awxkit.api.mixins import HasCreate from awxkit.api.resources import resources from awxkit.config import config @@ -11,7 +12,7 @@ from . import base class Schedule(HasCreate, base.Base): - dependencies = [SystemJobTemplate] + dependencies = [JobTemplate, SystemJobTemplate, Project, InventorySource, WorkflowJobTemplate] NATURAL_KEY = ('unified_job_template', 'name') def silent_delete(self):