Beispiel #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()
Beispiel #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)
Beispiel #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)