Index: trunk/tools/editor_trends/etl/transformer.py |
— | — | @@ -49,13 +49,15 @@ |
50 | 50 | |
51 | 51 | class Editor: |
52 | 52 | def __init__(self, rts, editor_id): |
53 | | - self.db_raw = storage.init_database(rts.storage, rts.dbname, rts.editors_raw) |
54 | | - self.db_dataset = storage.init_database(rts.storage, rts.dbname, rts.editors_dataset) |
| 53 | + self.editor_id = editor_id |
| 54 | + self.rts = rts |
55 | 55 | |
56 | 56 | def __str__(self): |
57 | 57 | return '%s' % (self.editor_id) |
58 | 58 | |
59 | 59 | def __call__(self): |
| 60 | + self.db_raw = storage.init_database(rts.storage, rts.dbname, rts.editors_raw) |
| 61 | + self.db_dataset = storage.init_database(rts.storage, rts.dbname, rts.editors_dataset) |
60 | 62 | cutoff = 9 |
61 | 63 | editor = self.db_raw.find_one('editor', self.editor_id) |
62 | 64 | if editor == None: |