Package londiste :: Module file_write :: Class FileWrite
[frames] | no frames]

Class FileWrite

source code

                 object --+                
                          |                
skytools.scripting.DBScript --+            
                              |            
          pgq.consumer.Consumer --+        
                                  |        
        pgq.consumer.SerialConsumer --+    
                                      |    
                    playback.Replicator --+
                                          |
                                         FileWrite

Writes events into file.

Incomplete implementation.

Instance Methods
 
load_state(self, batch_id) source code
 
process_batch(self, db, batch_id, ev_list)
Process all events in batch.
source code
 
save_state(self, do_commit) source code
 
sync_tables(self, dst_db)
Table sync loop.
source code
 
interesting(self, ev) source code
 
handle_data_event(self, ev) source code
 
handle_system_event(self, ev)
System event.
source code
 
flush_sql(self) source code

Inherited from playback.Replicator: __init__, change_table_state, fill_mirror_queue, get_table_by_name, get_table_by_state, handle_events, handle_seqs, launch_copy, load_table_state, process_remote_batch, remove_table, save_table_state, sync_from_copy_thread, sync_from_main_thread

Inherited from pgq.consumer.SerialConsumer: attach, clean_completed_tick, detach, dst_reset, init_optparse, is_batch_done, rewind, set_batch_done, startup

Inherited from pgq.consumer.Consumer: get_batch_info, process_event, register_consumer, stat_end, stat_start, unregister_consumer, 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, stat_add, stat_increase, stat_put, stop

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

Class Variables
  last_successful_batch = None

Inherited from playback.Replicator: cur_tick, prev_tick, sql_command

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

Properties

Inherited from object: __class__

Method Details

process_batch(self, db, batch_id, ev_list)

source code 
Process all events in batch.
Overrides: pgq.consumer.SerialConsumer.process_batch
(inherited documentation)

sync_tables(self, dst_db)

source code 

Table sync loop.

Calls appropriate handles, which is expected to return one of SYNC_* constants.
Overrides: playback.Replicator.sync_tables
(inherited documentation)

interesting(self, ev)

source code 
Overrides: playback.Replicator.interesting

handle_data_event(self, ev)

source code 
Overrides: playback.Replicator.handle_data_event

handle_system_event(self, ev)

source code 
System event.
Overrides: playback.Replicator.handle_system_event
(inherited documentation)

flush_sql(self)

source code 
Overrides: playback.Replicator.flush_sql