iro/model/job.py
branchdevel
changeset 142 7d0c1fa97123
parent 140 75d0eaaa871d
child 152 14c99c89edf4
equal deleted inserted replaced
141:90c95fdd1e33 142:7d0c1fa97123
     6 class Status:
     6 class Status:
     7     '''status for one recipient'''
     7     '''status for one recipient'''
     8     todo = 1
     8     todo = 1
     9     good = 2
     9     good = 2
    10     error = 3
    10     error = 3
    11     def __init__(self, job):
    11     
    12         self.status = Status.todo
    12     def __init__(self, offer, status, errtext=None):
    13         self.job = job
    13         self.status = status
    14         self.offer = None           #the offer over that this job was done
    14         self.offer = offer             #the offer over that this job was done
    15         self.errtext = None         #the error text
    15         self.errtext = errtext         #the error text
    16 
    16 
    17 class ExJob:
    17 class ExJob:
    18     '''One Job is a class that handles one job has multiple tasks'''
    18     '''One Job is a class that handles one job has multiple tasks'''
    19     def __init__(self, dbjob, recipients, message, offers):
    19     def __init__(self, dbjob, recipients, message, offers):
    20         self.dbjob = dbjob       #Connection to mysql job element (id)
    20         self.dbjob = dbjob       #Connection to mysql job element (id)