def __init__(self, dbname=None, dbconfig=None, dbIn=None): """The standard constructor takes the database name (dbname) and the name of the configuration section (dbconfig) """ if not dbname: dbname = "ProductionDB" if not dbconfig: dbconfig = "Production/ProductionDB" if not dbIn: DB.__init__(self, dbname, dbconfig) self.lock = threading.Lock() self.prodValidator = ProdValidator() self.ProdTransManager = ProdTransManager() self.PRODPARAMS = [ "ProductionID", "ProductionName", "Description", "CreationDate", "LastUpdate", "AuthorDN", "AuthorGroup", "Status", ] self.TRANSPARAMS = [ "TransformationID", "ProductionID", "LastUpdate", "InsertedTime" ] self.TRANSLINKSPARAMS = [ "TransformationID", "ParentTransformationID", "ProductionID" ] self.PRODSTEPSPARAMS = [ "StepID", "Name", "Description", "LongDescription", "Body", "Type", "Plugin", "AgentType", "GroupSize", "InputQuery", "OutputQuery", "LastUpdate", "InsertedTime", ] self.statusActionDict = { "New": None, "Active": "startTransformation", "Stopped": "stopTransformation", "Cleaned": "cleanTransformation", }
def __init__(self, dbname=None, dbconfig=None, dbIn=None): """ The standard constructor takes the database name (dbname) and the name of the configuration section (dbconfig) """ if not dbname: dbname = 'ProductionDB' if not dbconfig: dbconfig = 'Production/ProductionDB' if not dbIn: DB.__init__(self, dbname, dbconfig) self.lock = threading.Lock() self.prodValidator = ProdValidator() self.ProdTransManager = ProdTransManager() self.PRODPARAMS = ['ProductionID', 'ProductionName', 'Description', 'CreationDate', 'LastUpdate', 'AuthorDN', 'AuthorGroup', 'Status'] self.TRANSPARAMS = ['TransformationID', 'ProductionID', 'LastUpdate', 'InsertedTime'] self.TRANSLINKSPARAMS = ['TransformationID', 'ParentTransformationID', 'ProductionID'] self.PRODSTEPSPARAMS = ['StepID', 'Name', 'Description', 'LongDescription', 'Body', 'Type', 'Plugin', 'AgentType', 'GroupSize', 'InputQuery', 'OutputQuery', 'LastUpdate', 'InsertedTime'] self.statusActionDict = { 'New': None, 'Active': 'startTransformation', 'Stopped': 'stopTransformation', 'Cleaned': 'cleanTransformation'}