/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Private Member Functions
vshunt::Shunter Class Reference

List of all members.

Public Member Functions

def __init__
def reset_target
def delete_target
def create_target
def __call__

Public Attributes

 db
 src
 tgt
 args
 cks

Private Member Functions

def _collect

Detailed Description

This Shunter dict holds the history instances keyed by (SITEMASK, SUBSITE) 

Definition at line 84 of file vshunt.py.


Constructor & Destructor Documentation

def vshunt::Shunter::__init__ (   self,
  db,
  src,
  tgt,
  args 
)

Definition at line 88 of file vshunt.py.

00089                                           :
00090         dict.__init__(self)
00091         self.db = db
00092         self.src = src
00093         self.tgt = tgt
00094         self.args = args
00095         self.cks = Chunks(db, args)
00096         self['tname'] = tgt.__name__[1:]
00097         self._collect()


Member Function Documentation

def vshunt::Shunter::_collect (   self) [private]
Collect histories into this dict keyed on (SITEMASK, SUBSITE)

Definition at line 98 of file vshunt.py.

00099                       :
00100         """
00101         Collect histories into this dict keyed on (SITEMASK, SUBSITE)
00102         """
00103         for ssd in self.cks['sss']:
00104             ss=(ssd['sitemask'],ssd['subsite'])
00105             sitemask, subsite = ss 
00106             self[ss] = History( self.src, sitemask=sitemask, subsite=subsite , paydict_=lambda rpt:{} , target_tablename=self.tgt.__name__[1:], dupefirst=True  )
00107             print self[ss]

def vshunt::Shunter::reset_target (   self)

Definition at line 108 of file vshunt.py.

00109                           :
00110         self.delete_target()
        self.create_target()
def vshunt::Shunter::delete_target (   self)

Definition at line 111 of file vshunt.py.

00112                            :
00113         assert self.db.sect == 'tmp_offline_db' 
00114         self.db("drop table if exists %(tname)s, %(tname)sVld" % self )      
        self.db("delete from LOCALSEQNO where TABLENAME='%(tname)s'" % self )
def vshunt::Shunter::create_target (   self)

Definition at line 115 of file vshunt.py.

00116                            :
00117         self.tgt().CreateDatabaseTables(0,  self['tname'] )

def vshunt::Shunter::__call__ (   self)
control shunting order to achieve SEQNO alignment between src and tgt

Definition at line 118 of file vshunt.py.

00119                       :
00120         """
00121         control shunting order to achieve SEQNO alignment between src and tgt
00122         """
00123         self.reset_target()
00124         sql = "select SEQNO, SITEMASK, SUBSITE from %(tn)sVld order by SEQNO " % dict(tn=self.src.__name__[1:])
00125         for SSS in self.db(sql):
00126             seqno = int(SSS['SEQNO'])
00127             ss = (int(SSS['SITEMASK']),int(SSS['SUBSITE']))
00128             print "%s : %r " % ( seqno , repr(ss) )
00129             self[ss].shunt( seqno )
00130 


Member Data Documentation

Definition at line 88 of file vshunt.py.

Definition at line 88 of file vshunt.py.

Definition at line 88 of file vshunt.py.

Definition at line 88 of file vshunt.py.

Definition at line 88 of file vshunt.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:03 for Scraper by doxygen 1.7.4