diff options
author | Marko Kreen | 2012-05-15 15:41:16 +0000 |
---|---|---|
committer | Marko Kreen | 2012-05-15 15:41:16 +0000 |
commit | 0bf91b12f4cac68a2dd442476244f4b38082ea0e (patch) | |
tree | 4f4d943b1809693eba43258e83f619bd55891a9f /python | |
parent | 8d0d1585bd3ede34f227d8ea2c80baa275720685 (diff) |
handlers.dispatch: add comment about differences from part_func
If create_partitions() does not exist, the table is created
manually. But there are differences from how table is created.
Add comment about it, we might want to fix it someday.
Diffstat (limited to 'python')
-rw-r--r-- | python/londiste/handlers/dispatch.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/londiste/handlers/dispatch.py b/python/londiste/handlers/dispatch.py index 6505736a..3441fc19 100644 --- a/python/londiste/handlers/dispatch.py +++ b/python/londiste/handlers/dispatch.py @@ -879,7 +879,9 @@ class Dispatcher(BaseHandler): curs.execute(sql) return True return False + exec_with_vals(self.conf.pre_part) + if not exec_with_vals(self.conf.part_template): self.log.debug('part_template not provided, using part func') # if part func exists call it with val arguments @@ -889,9 +891,17 @@ class Dispatcher(BaseHandler): self.log.debug('check_part.exec: func:%s, args: %s' % (pfcall, vals)) curs.execute(pfcall, vals) else: + # + # Otherwise crete simple clone. + # + # FixMe: differences from create_partitions(): + # - check constraints + # - inheritance + # self.log.debug('part func %s not found, cloning table' % self.conf.part_func) struct = TableStruct(curs, self.dest_table) struct.create(curs, T_ALL, dst) + exec_with_vals(self.conf.post_part) self.log.info("Created table: %s" % dst) |