Package londiste :: Module repair :: Class Repairer
[frames] | no frames]

Class Repairer

source code

                 object --+        
                          |        
skytools.scripting.DBScript --+    
                              |    
                  syncer.Syncer --+
                                  |
                                 Repairer

Walks tables in primary key order and checks if data matches.

Instance Methods
 
process_sync(self, tbl, src_db, dst_db)
Actual comparision.
source code
 
gen_copy_tbl(self, tbl, src_curs, dst_curs) source code
 
dump_table(self, tbl, copy_tbl, curs, fn) source code
 
get_row(self, ln) source code
 
dump_compare(self, tbl, src_fn, dst_fn) source code
 
got_missed_insert(self, tbl, src_row) source code
 
got_missed_update(self, tbl, src_row, dst_row) source code
 
got_missed_delete(self, tbl, dst_row, pkey_list) source code
 
show_fix(self, tbl, q, desc) source code
 
addeq(self, list, f, v) source code
 
addcmp(self, list, f, v) source code
 
cmp_data(self, src_row, dst_row) source code
 
cmp_value(self, v1, v2) source code
 
cmp_keys(self, src_row, dst_row)
Compare primary keys of the rows.
source code

Inherited from syncer.Syncer: __init__, check_consumer, check_table, get_subscriber_table_state, init_optparse, work

Inherited from skytools.scripting.DBScript: close_database, get_database, hook_sighup, hook_sigint, reload, reset, run, run_once, send_signal, send_stats, set_single_loop, start, startup, stat_add, stat_increase, stat_put, stop

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables

Inherited from skytools.scripting.DBScript: cf, job_name, log, service_name

Properties

Inherited from object: __class__

Method Details

process_sync(self, tbl, src_db, dst_db)

source code 
Actual comparision.
Overrides: syncer.Syncer.process_sync

cmp_keys(self, src_row, dst_row)

source code 

Compare primary keys of the rows.

Returns 1 if src > dst, -1 if src < dst and 0 if src == dst