- Implemented a new script to upsert data from SQLite dumps into PostgreSQL asynchronously.

- Added detailed reporting for each table processed, including success and error statuses.
- Integrated Discord notifications for various stages of the upsert process.
- Included functionality to fetch the latest SQLite dump from a specified URL.
- Added error handling and state management for the upsert process.

Resolves #34
This commit is contained in:
2026-01-25 22:06:24 -05:00
parent 97fd7dd67d
commit 277804d212
8 changed files with 2136 additions and 27 deletions

View File

@@ -99,7 +99,9 @@ POSTGRES_PASSWORD = os.getenv("POSTGRES_PASSWORD", "")
# URL-encode the password to handle special characters
encoded_password = urllib.parse.quote_plus(POSTGRES_PASSWORD)
DATABASE_URL: str = f"postgresql+asyncpg://{POSTGRES_USER}:{encoded_password}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DB}"
DATABASE_URL: str = (
f"postgresql+asyncpg://{POSTGRES_USER}:{encoded_password}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DB}"
)
async_engine: AsyncEngine = create_async_engine(
DATABASE_URL, pool_size=20, max_overflow=10, pool_pre_ping=True, echo=False
)