diff options
author | martinko | 2012-12-20 15:24:47 +0000 |
---|---|---|
committer | martinko | 2012-12-20 15:24:47 +0000 |
commit | 9a623e11cde1c865f65b7d3685e7ccbccb07a648 (patch) | |
tree | 973799d8b6022fe19c76d00971ccaee2546b37b2 | |
parent | 303b635f6753605a0d052537970468465feb897e (diff) |
noise
-rw-r--r-- | python/londiste/compare.py | 7 | ||||
-rw-r--r-- | python/skytools/__init__.py | 7 | ||||
-rw-r--r-- | python/skytools/hashtext.py | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/python/londiste/compare.py b/python/londiste/compare.py index 067a6b49..ff304f0a 100644 --- a/python/londiste/compare.py +++ b/python/londiste/compare.py @@ -12,11 +12,11 @@ __all__ = ['Comparator'] from londiste.syncer import Syncer class Comparator(Syncer): - """Simple checker based in Syncer. + """Simple checker based on Syncer. When tables are in sync runs simple SQL query on them. """ def process_sync(self, t1, t2, src_db, dst_db): - """Actual comparision.""" + """Actual comparison.""" src_tbl = t1.dest_table dst_tbl = t2.dest_table @@ -43,7 +43,7 @@ class Comparator(Syncer): q = self.cf.get('compare_sql', q) q = q.replace("_COLS_", cols) src_q = q.replace('_TABLE_', skytools.quote_fqident(src_tbl)) - if src_where: + if src_where: src_q = src_q + " WHERE " + src_where dst_q = q.replace('_TABLE_', skytools.quote_fqident(dst_tbl)) if dst_where: @@ -109,4 +109,3 @@ class Comparator(Syncer): if __name__ == '__main__': script = Comparator(sys.argv[1:]) script.start() - diff --git a/python/skytools/__init__.py b/python/skytools/__init__.py index dd9473b9..792ae29b 100644 --- a/python/skytools/__init__.py +++ b/python/skytools/__init__.py @@ -34,6 +34,9 @@ _symbols = { 'write_atomic': 'skytools.fileutil:write_atomic', # skytools.gzlog 'gzip_append': 'skytools.gzlog:gzip_append', + # skytools.hashtext + 'hashtext_old': 'skytools.hashtext:hashtext_old', + 'hashtext_new': 'skytools.hashtext:hashtext_new', # skytools.natsort 'natsort': 'skytools.natsort:natsort', 'natsort_icase': 'skytools.natsort:natsort_icase', @@ -133,9 +136,6 @@ _symbols = { 'parse_iso_timestamp': 'skytools.timeutil:parse_iso_timestamp', # skytools.utf8 'safe_utf8_decode': 'skytools.utf8:safe_utf8_decode', - # hashing - 'hashtext_old': 'skytools.hashtext:hashtext_old', - 'hashtext_new': 'skytools.hashtext:hashtext_new', } __all__ = _symbols.keys() @@ -212,4 +212,3 @@ else: for k in xall: if k not in __all__: print '%s missing from top-level?' % k - diff --git a/python/skytools/hashtext.py b/python/skytools/hashtext.py index 6a9cf11d..d230ae59 100644 --- a/python/skytools/hashtext.py +++ b/python/skytools/hashtext.py @@ -89,7 +89,6 @@ def hashtext_old_py(k): return int(c) - # # New Postgres hashtext() - hacked lookup3: # - custom initval @@ -160,4 +159,3 @@ except ImportError: if __name__ == '__main__': import doctest doctest.testmod() - |