Index: trunk/tools/editor_trends/classes/buffer.py |
— | — | @@ -98,13 +98,14 @@ |
99 | 99 | if self.n > 10000: |
100 | 100 | #print '%s: Emptying buffer %s - buffer size %s' % (datetime.datetime.now(), self.id, len(self.revisions)) |
101 | 101 | self.store() |
| 102 | + self.n = 0 |
102 | 103 | else: |
103 | 104 | self.n += 1 |
104 | 105 | |
105 | 106 | def simplify(self, revision): |
106 | 107 | row = [] |
107 | 108 | for key in self.keys: |
108 | | - row.append(value.decode('utf-8')) |
| 109 | + row.append(revision[key].decode('utf-8')) |
109 | 110 | return row |
110 | 111 | |
111 | 112 | def stringify(self, revision): |
— | — | @@ -189,6 +190,7 @@ |
190 | 191 | self.lock.release(file_id) |
191 | 192 | del self.revisions[file_id] |
192 | 193 | wait = True |
| 194 | + print 'Buffer size: %s' % len(self.revisions.keys()) |
193 | 195 | # t1 = datetime.datetime.now() |
194 | 196 | # print 'Worker %s: %s revisions took %s' % (self.process_id, |
195 | 197 | # len([1]), |