londiste/handlers/dispatch: fixed issue with missing part_func description
authormartinko <gamato@users.sf.net>
Mon, 7 Jan 2013 15:32:39 +0000 (16:32 +0100)
committermartinko <gamato@users.sf.net>
Mon, 7 Jan 2013 15:32:39 +0000 (16:32 +0100)
Fixes the following issue with Dispatcher based handlers:
ValueError: Invalid handler argument: ['part_func']

python/londiste/handlers/dispatch.py

index eafa201f8497dfb5317fd7ef56a76bff251a05a2..ecbc62855076d124b42fc5bbd9674eae2bfba54e 100644 (file)
@@ -43,11 +43,15 @@ table_mode:
     * direct - non-partitioned table
     * ignore - all events are ignored
 
+part_func:
+    database function to use for creating partition table.  if not found then
+    parent table is cloned.  default is {londiste|public}.create_partition
+
 part_mode:
-    * batch_time - paritioned by batch creation time (default)
+    * batch_time - partitioned by batch creation time (default)
     * event_time - partitioned by event creation time
-    * date_field - paritioned by date_field value. part_field required
-    * current_time - paritioned by current time
+    * date_field - partitioned by date_field value. part_field required
+    * current_time - partitioned by current time
 
 part_field:
     date_field to use for partition. Required when part_mode=date_field
@@ -878,7 +882,7 @@ class Dispatcher(BaseHandler):
                 curs.execute(pfcall, vals)
             else:
                 #
-                # Otherwise crete simple clone.
+                # Otherwise create simple clone.
                 #
                 # FixMe: differences from create_partitions():
                 # - check constraints
@@ -893,7 +897,7 @@ class Dispatcher(BaseHandler):
 
     def real_copy(self, tablename, src_curs, dst_curs, column_list):
         """do actual table copy and return tuple with number of bytes and rows
-        copyed
+        copied
         """
         _src_cols = _dst_cols = column_list
         condition = ''