Exemplo n.º 1
0
 def __init__(self, db_uri, sort_path, preserve_path, nims_path, dir_mode, sleep_time):
     super(Sorter, self).__init__()
     self.sort_path = nimsutil.make_joined_path(sort_path)
     self.preserve_path = nimsutil.make_joined_path(preserve_path) if preserve_path else None
     self.nims_path = nimsutil.make_joined_path(nims_path)
     self.dir_mode = dir_mode
     self.sleep_time = sleep_time
     self.alive = True
     model.init_model(sqlalchemy.create_engine(db_uri))
Exemplo n.º 2
0
 def __init__(self, db_uri, sort_path, preserve_path, nims_path, dir_mode,
              sleep_time):
     super(Sorter, self).__init__()
     self.sort_path = nimsutil.make_joined_path(sort_path)
     self.preserve_path = nimsutil.make_joined_path(
         preserve_path) if preserve_path else None
     self.nims_path = nimsutil.make_joined_path(nims_path)
     self.dir_mode = dir_mode
     self.sleep_time = sleep_time
     self.alive = True
     model.init_model(sqlalchemy.create_engine(db_uri))
Exemplo n.º 3
0
 def __init__(self, db_uri, stage_path, unsort_path, nims_path, dir_mode, preserve_mode, sleep_time, log):
     super(Sorter, self).__init__()
     self.stage_path = stage_path
     self.unsort_path = unsort_path
     self.nims_path = nims_path
     self.dir_mode = dir_mode
     self.preserve_mode = preserve_mode
     self.sleep_time = sleep_time
     self.log = log
     self.alive = True
     self.dataset_classes = sorted(model.PrimaryMRData.__subclasses__(), key=lambda cls: cls.priority)
     model.init_model(sqlalchemy.create_engine(db_uri))
Exemplo n.º 4
0
def setup_db():
    """Method used to build a database"""
    engine = config['pylons.app_globals'].sa_engine
    model.init_model(engine)
    model.metadata.create_all(engine)
Exemplo n.º 5
0
def setup_db():
    """Method used to build a database"""
    engine = config['pylons.app_globals'].sa_engine
    model.init_model(engine)
    model.metadata.create_all(engine)