Exemplo n.º 1
0
 def wipe_storage(mysql_url):
     engine = create_engine(mysql_url,
                            isolation_level="AUTOCOMMIT",
                            poolclass=db.pool.NullPool)
     try:
         ScheduleStorageSqlMetadata.drop_all(engine)
     finally:
         engine.dispose()
Exemplo n.º 2
0
 def create_clean_storage(postgres_url, should_autocreate_tables=True):
     engine = create_engine(postgres_url,
                            isolation_level="AUTOCOMMIT",
                            poolclass=db.pool.NullPool)
     try:
         ScheduleStorageSqlMetadata.drop_all(engine)
     finally:
         engine.dispose()
     return PostgresScheduleStorage(postgres_url, should_autocreate_tables)
Exemplo n.º 3
0
 def create_clean_storage(postgres_url):
     engine = create_engine(postgres_url,
                            isolation_level='AUTOCOMMIT',
                            poolclass=db.pool.NullPool)
     try:
         ScheduleStorageSqlMetadata.drop_all(engine)
     finally:
         engine.dispose()
     return PostgresScheduleStorage(postgres_url)