Package helpers :: Module SyncDb :: Class SyncDb
[hide private]

Class SyncDb

source code


Updates a database with the latest schema and data from another database up to the given CU level (0 = curation-data; 1 = transfer-data; 3 = metadata; 4 = detections; 7 = sources; 16 = neighbours).

Nested Classes [hide private]
    Nested Errors and Exceptions

Inherited from wsatools.DbConnect.CuSession.CuSession: CuError

Instance Methods [hide private]
 
_onRun(self)
Synchronises the database.
source code
 
_updateTable(self, table)
Update contents of table.
source code
 
_onException(self)
Don't update programme curation history on exception - this is just to keep the exception message clear in the displayed log.
source code

Inherited from wsatools.DbConnect.CuSession.CuSession: __del__, __init__, logBrokenFile, run

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

Static Methods [hide private]

Inherited from wsatools.DbConnect.CuSession.CuSession: logException

Class Variables [hide private]
  cuNum = 22
Curation task number.
  _autoCommit = True
Should this curation task auto-commit database transactions?
  _isPersistent = True
Should this curation task try to re-open broken database connections?
  copyAllData = False
Copy all data not just non-deprecated data?
  cuLevel = 3
Copy data up to this curation level.
  dateRange = DateRange(begin=<mx.DateTime.DateTime object for '...
Copy data between these dates.
  excludeProgs = ()
Exclude these non-survey programmes from the world release.
  forceSQL = False
Only copy data through SQL interface - don't do bulk copies?
  fromDbPathName = None
Source database to synchronise from.
  includeMergeLog = False
Copy merge log table data when synchronising at any level.
  isMetadataMirror = False
Just copy metadata and curation tables into a mirror release database.
  overwriteDb = False
Create a new database before syncing?
  skipProvenance = False
Don't synchronise provenance?
  _fromDb = None
Connection to the source database (usually the load database).

Inherited from wsatools.DbConnect.CuSession.CuSession: archive, comment, cuEventID, curator, eTypes, isDayStampedLog, onlyNonSurveys, onlySurveys, programme, programmeID, resultsFilePathName, shareFileID, sysc

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_onRun(self)

source code 

Synchronises the database.

Overrides: wsatools.DbConnect.CuSession.CuSession._onRun

_updateTable(self, table)

source code 

Update contents of table.

Parameters:
  • table (Schema.Table) - Table details.

_onException(self)

source code 

Don't update programme curation history on exception - this is just to keep the exception message clear in the displayed log. Following exception the script will probably be re-run anyway.

Overrides: wsatools.DbConnect.CuSession.CuSession._onException

Class Variable Details [hide private]

dateRange

Copy data between these dates.

Value:
DateRange(begin=<mx.DateTime.DateTime object for '1753-01-01 00:00:00.\
00' at 46b5c00>, end=<mx.DateTime.DateTime object for '9999-12-31 00:0\
0:00.00' at 46b8d68>)