Allow passing variables with schedules to support extra data on system jobs

This commit is contained in:
Matthew Jones
2014-10-17 14:41:00 -04:00
parent 6292c8ddbd
commit 103929c9ee
5 changed files with 516 additions and 3 deletions

View File

@@ -11,6 +11,9 @@ from django.db import models
from django.db.models.query import QuerySet
from django.utils.timezone import now, make_aware, get_default_timezone
# Django-JSONField
from jsonfield import JSONField
# AWX
from awx.main.models.base import *
from awx.main.utils import ignore_inventory_computed_fields, emit_websocket_notification
@@ -82,6 +85,10 @@ class Schedule(CommonModel):
default=None,
editable=False,
)
extra_data = JSONField(
blank=True,
default={}
)
def __unicode__(self):
return u'%s_t%s_%s_%s' % (self.name, self.unified_job_template.id, self.id, self.next_run)