equal
deleted
inserted
replaced
9 #See the GNU General Public License for more details. |
9 #See the GNU General Public License for more details. |
10 |
10 |
11 #You should have received a copy of the GNU General Public License |
11 #You should have received a copy of the GNU General Public License |
12 #along with this program; if not, see <http://www.gnu.org/licenses/>. |
12 #along with this program; if not, see <http://www.gnu.org/licenses/>. |
13 |
13 |
|
14 import logging |
|
15 logger=logging.getLogger("job") |
14 |
16 |
15 class Job(object): |
17 class Job(object): |
16 ''' |
18 ''' |
17 Basic class for all jobs |
19 Basic class for all jobs |
18 ''' |
20 ''' |
40 |
42 |
41 def getProvider(self): |
43 def getProvider(self): |
42 return None |
44 return None |
43 |
45 |
44 def addGood(self, good): |
46 def addGood(self, good): |
45 import logging |
47 logger.debug('Job(%d)-send to %s'%(self.id, str(good))) |
46 logging.debug('Job(%d)-send to %s'%(self.id, str(good))) |
|
47 if type(good) == list: |
48 if type(good) == list: |
48 self.dStatus['good']=self.dStatus['good']+good |
49 self.dStatus['good']=self.dStatus['good']+good |
49 else: |
50 else: |
50 self.dStatus['good'].append(good) |
51 self.dStatus['good'].append(good) |
51 |
52 |
52 def addFailed(self, failed): |
53 def addFailed(self, failed): |
53 import logging |
54 logger.debug('Job(%d)-faild to send to %s'%(self.id, str(failed))) |
54 logging.debug('Job(%d)-faild to send to %s'%(self.id, str(failed))) |
|
55 if type(failed) == list: |
55 if type(failed) == list: |
56 self.dStatus['failed']=self.dStatus['failed']+failed |
56 self.dStatus['failed']=self.dStatus['failed']+failed |
57 else: |
57 else: |
58 self.dStatus['failed'].append(failed) |
58 self.dStatus['failed'].append(failed) |
59 |
59 |