mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Implement timeout on job/job-template.
This commit is contained in:
parent
37139301b4
commit
d52e237ea0
@ -1789,7 +1789,7 @@ class JobOptionsSerializer(BaseSerializer):
|
||||
fields = ('*', 'job_type', 'inventory', 'project', 'playbook',
|
||||
'credential', 'cloud_credential', 'network_credential', 'forks', 'limit',
|
||||
'verbosity', 'extra_vars', 'job_tags', 'force_handlers',
|
||||
'skip_tags', 'start_at_task',)
|
||||
'skip_tags', 'start_at_task', 'timeout')
|
||||
|
||||
def get_related(self, obj):
|
||||
res = super(JobOptionsSerializer, self).get_related(obj)
|
||||
|
24
awx/main/migrations/0033_v310_job_timeout.py
Normal file
24
awx/main/migrations/0033_v310_job_timeout.py
Normal file
@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0032_v302_credential_permissions_update'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='job',
|
||||
name='timeout',
|
||||
field=models.PositiveIntegerField(default=0, blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='jobtemplate',
|
||||
name='timeout',
|
||||
field=models.PositiveIntegerField(default=0, blank=True),
|
||||
),
|
||||
]
|
@ -143,6 +143,10 @@ class JobOptions(BaseModel):
|
||||
allow_simultaneous = models.BooleanField(
|
||||
default=False,
|
||||
)
|
||||
timeout = models.PositiveIntegerField(
|
||||
blank=True,
|
||||
default=0,
|
||||
)
|
||||
|
||||
extra_vars_dict = VarsDictProperty('extra_vars', True)
|
||||
|
||||
@ -253,7 +257,11 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, ResourceMixin):
|
||||
'playbook', 'credential', 'cloud_credential', 'network_credential', 'forks', 'schedule',
|
||||
'limit', 'verbosity', 'job_tags', 'extra_vars', 'launch_type',
|
||||
'force_handlers', 'skip_tags', 'start_at_task', 'become_enabled',
|
||||
<<<<<<< 887818cb8987d465e23f1ed0c5886473acdbfcda
|
||||
'labels', 'survey_passwords', 'allow_simultaneous',]
|
||||
=======
|
||||
'labels', 'survey_passwords', 'timeout']
|
||||
>>>>>>> Implement timeout on job/job-template.
|
||||
|
||||
def resource_validation_data(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user