From f60cf4c8c624217c44ee5144d6d6f9ad298da8f6 Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 12 Feb 2008 17:44:29 +0000 Subject: [PATCH] improve TODO asciidoc markup, print stats from section sub-threads --- TODO.txt | 9 +++++---- pgloader/pgloader.py | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/TODO.txt b/TODO.txt index e3315c3..ebaf760 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,10 +1,10 @@ -= TODO LIST = += PGLOADER TODO LIST = == Multi Threaded Import == * Terminate +split_file_reading+ behavior implementation (status: debug) -* Implement /round robin reader/ behavior +* Implement 'round robin reader' behavior == Constraint Exclusion support == @@ -17,6 +17,7 @@ if the destination table has some children etc. You'll need to provide also a global ce_path parameter (where to find user python constraint exclusion modules) and a +ce_modules+ parameter for each section where +constraint_exclusion = on+: + ce_modules = columnA:module:class, columnB:module:class As the +ce_path+ could point to any number of modules where a single @@ -119,11 +120,11 @@ column. Add options: -* +skip_head_lines+ ++skip_head_lines+:: Will allow to skip the +n+ first lines of the given files (headers) -* +with_header+ ++with_header+:: Will allow pgloader to configure the +columns+ parameter from the first line of the file, and skip loading it. diff --git a/pgloader/pgloader.py b/pgloader/pgloader.py index 0ee5a2b..ea50596 100644 --- a/pgloader/pgloader.py +++ b/pgloader/pgloader.py @@ -834,9 +834,6 @@ class PGLoader(threading.Thread): if TRIGGERS and not DRY_RUN: self.db.enable_triggers(self.table) - # then show up some stats - self.print_stats() - self.log.info("loading done") return @@ -849,6 +846,9 @@ class PGLoader(threading.Thread): for x in [self.table, self.duration, self.db.commited_rows, self.errors]: self.stats.append(x) + + # then show up some stats + self.print_stats() def process(self): """ depending on configuration, do given job """