diff --git a/awx/api/serializers.py b/awx/api/serializers.py index d72a3e3730..7eeaf1f92a 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -2062,7 +2062,7 @@ class AdHocCommandSerializer(UnifiedJobSerializer): model = AdHocCommand fields = ('*', 'job_type', 'inventory', 'limit', 'credential', 'module_name', 'module_args', 'forks', 'verbosity', 'extra_vars', - 'become_enabled', 'timeout', '-unified_job_template', '-description') + 'become_enabled', '-unified_job_template', '-description') extra_kwargs = { 'name': { 'read_only': True, @@ -2160,7 +2160,7 @@ class SystemJobSerializer(UnifiedJobSerializer): class Meta: model = SystemJob - fields = ('*', 'system_job_template', 'job_type', 'extra_vars', 'timeout') + fields = ('*', 'system_job_template', 'job_type', 'extra_vars') def get_related(self, obj): res = super(SystemJobSerializer, self).get_related(obj) diff --git a/awx/main/migrations/0036_v310_job_timeout.py b/awx/main/migrations/0036_v310_job_timeout.py index 5045985fb7..7bc5868ff8 100644 --- a/awx/main/migrations/0036_v310_job_timeout.py +++ b/awx/main/migrations/0036_v310_job_timeout.py @@ -11,11 +11,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AddField( - model_name='adhoccommand', - name='timeout', - field=models.PositiveIntegerField(default=0, blank=True), - ), migrations.AddField( model_name='inventorysource', name='timeout', @@ -46,14 +41,4 @@ class Migration(migrations.Migration): name='timeout', field=models.PositiveIntegerField(default=0, blank=True), ), - migrations.AddField( - model_name='systemjob', - name='timeout', - field=models.PositiveIntegerField(default=0, blank=True), - ), - migrations.AddField( - model_name='systemjobtemplate', - name='timeout', - field=models.PositiveIntegerField(default=0, blank=True), - ), ] diff --git a/awx/main/models/ad_hoc_commands.py b/awx/main/models/ad_hoc_commands.py index dce9767bd0..b03be56452 100644 --- a/awx/main/models/ad_hoc_commands.py +++ b/awx/main/models/ad_hoc_commands.py @@ -88,10 +88,6 @@ class AdHocCommand(UnifiedJob, JobNotificationMixin): blank=True, default='', ) - timeout = models.PositiveIntegerField( - blank=True, - default=0, - ) extra_vars_dict = VarsDictProperty('extra_vars', True) diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 076a5c618f..ae83cf87ba 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -1336,10 +1336,6 @@ class SystemJobOptions(BaseModel): default='', ) - timeout = models.PositiveIntegerField( - blank=True, - default=0, - ) class SystemJobTemplate(UnifiedJobTemplate, SystemJobOptions): @@ -1352,7 +1348,7 @@ class SystemJobTemplate(UnifiedJobTemplate, SystemJobOptions): @classmethod def _get_unified_job_field_names(cls): - return ['name', 'description', 'job_type', 'extra_vars', 'timeout'] + return ['name', 'description', 'job_type', 'extra_vars'] def get_absolute_url(self): return reverse('api:system_job_template_detail', args=(self.pk,)) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 2e25ee39b4..f1e8daed78 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -597,9 +597,6 @@ class BaseTask(Task): else: os.kill(job.pid, signal.SIGTERM) time.sleep(3) - if is_cancel: - return True - self.timed_out = True except OSError: keyword = 'cancel' if is_cancel else 'timeout' logger.warn("Attempted to %s already finished job, ignoring" % keyword)