Example #1
0
 def wipe_storage(mysql_url):
     engine = create_engine(mysql_url,
                            isolation_level="AUTOCOMMIT",
                            poolclass=db.pool.NullPool)
     try:
         SqlEventLogStorageMetadata.drop_all(engine)
     finally:
         engine.dispose()
Example #2
0
    def create_clean_storage(conn_string, should_autocreate_tables=True):
        engine = create_engine(
            conn_string, isolation_level="AUTOCOMMIT", poolclass=db.pool.NullPool
        )
        try:
            SqlEventLogStorageMetadata.drop_all(engine)
        finally:
            engine.dispose()

        return PostgresEventLogStorage(conn_string, should_autocreate_tables)