From 899d36b2c9e4eea563ed6cafe84c8e72dbb2b30a Mon Sep 17 00:00:00 2001 From: Alexander Komarov Date: Thu, 19 Aug 2021 15:20:52 +0500 Subject: [PATCH] Fix tests --- awx/main/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 83b7d9bd69..6588ef630a 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1369,8 +1369,9 @@ class BaseTask(object): }, } - if settings.DEFAULT_JOB_IDLE_TIMEOUT > 0: - params['settings']['idle_timeout'] = settings.DEFAULT_JOB_IDLE_TIMEOUT + idle_timeout = getattr(settings, 'DEFAULT_JOB_IDLE_TIMEOUT', 0) + if idle_timeout > 0: + params['settings']['idle_timeout'] = idle_timeout if isinstance(self.instance, AdHocCommand): params['module'] = self.build_module_name(self.instance)