iro/iro.py
changeset 1 18918fbc397c
parent 0 a3b6e531f0d2
child 6 c5672760138b
equal deleted inserted replaced
0:a3b6e531f0d2 1:18918fbc397c
   119             self.job.addGood(arranged)
   119             self.job.addGood(arranged)
   120         
   120         
   121         if failed:
   121         if failed:
   122             self.job.addFailed(failed)
   122             self.job.addFailed(failed)
   123     
   123     
   124 
   124 class MySmstrade(anbieter.smstrade):
       
   125     
       
   126     def __init__(self ):
       
   127         anbieter.smstrade.__init__(self )
       
   128     
       
   129     def setJob(self, job):
       
   130         self.job=job
       
   131     
       
   132     def updateStatus(self, arranged=None, failed=None):
       
   133         if arranged:
       
   134             self.job.addGood(arranged)
       
   135         
       
   136         if failed:
       
   137             self.job.addFailed(failed)
       
   138 						
   125 class Jobs:
   139 class Jobs:
   126     '''
   140     '''
   127     Providing an list of jobs; each new job gets a hash id
   141     Providing an list of jobs; each new job gets a hash id
   128     '''
   142     '''
   129     def __init__(self,manager, queue,provider):
   143     def __init__(self,manager, queue,provider):
   193     sip=MySipgate()
   207     sip=MySipgate()
   194     sip.read_basic_config("iro.conf")
   208     sip.read_basic_config("iro.conf")
   195     
   209     
   196     localhost=MySMTP()
   210     localhost=MySMTP()
   197     localhost.read_basic_config("iro.conf")
   211     localhost.read_basic_config("iro.conf")
       
   212 
       
   213     smstrade=MySmstrade()
       
   214     smstrade.read_basic_config("iro.conf")
   198     
   215     
   199     #Benutzerdatenbank erstellen
   216     #Benutzerdatenbank erstellen
   200     queue = Queue()
   217     queue = Queue()
   201     provider={"sms":sip, "fax":sip, "mail":localhost}
   218     provider={"sms":sip, "fax":sip, "mail":localhost}
   202     jobqueue=Jobs(manager,  queue, provider)
   219     jobqueue=Jobs(manager,  queue, provider)