mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 12:55:04 -02:30
Extend cache timeout to schedule runner also, block running a schedule
of an inventory update or a project update if its schedule places it within that time also
This commit is contained in:
@@ -298,6 +298,14 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
||||
def create_project_update(self, **kwargs):
|
||||
return self.create_unified_job(**kwargs)
|
||||
|
||||
@property
|
||||
def cache_timeout_blocked(self):
|
||||
if not self.last_job_run:
|
||||
return False
|
||||
if (self.last_job_run + datetime.timedelta(seconds=self.update_cache_timeout)) > now():
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def needs_update_on_launch(self):
|
||||
if self.active and self.scm_type and self.scm_update_on_launch:
|
||||
|
||||
Reference in New Issue
Block a user