app/soc/models/job.py
changeset 2212 4095892a3c99
parent 2209 989c7c945d5f
child 2216 2ac430aa5799
equal deleted inserted replaced
2211:f7497180d037 2212:4095892a3c99
    21 ]
    21 ]
    22 
    22 
    23 
    23 
    24 from google.appengine.ext import db
    24 from google.appengine.ext import db
    25 
    25 
    26 from django.utils.translation import ugettext
    26 from soc.models import base
    27 
    27 
    28 from soc.models import base
    28 import soc.models.priority_group
    29 from soc.models import priority_group
       
    30 
    29 
    31 
    30 
    32 class Job(base.ModelWithFieldAttributes):
    31 class Job(base.ModelWithFieldAttributes):
    33   """The Job model.
    32   """The Job model.
    34   """
    33   """
    35 
    34 
    36   #: reference to the priority group this job belongs to
    35   #: reference to the priority group this job belongs to
    37   priority_group = db.ReferenceProperty(
    36   priority_group = db.ReferenceProperty(
    38       reference_class=priority_group.PriorityGroup, required=True,
    37       reference_class=soc.models.priority_group.PriorityGroup,
    39       collection_name='jobs')
    38       required=True, collection_name='jobs')
    40 
    39 
    41   #: the name of the task as defined in soc.cron.job
    40   #: the name of the task as defined in soc.cron.job
    42   task_name = db.StringProperty(required=True)
    41   task_name = db.StringProperty(required=True)
    43 
    42 
    44   #: field storing the status of this job
    43   #: field storing the status of this job