fixed DB issue
This commit is contained in:
parent
e6db0f094c
commit
6adb88e0b1
1 changed files with 2 additions and 3 deletions
|
|
@ -12,8 +12,8 @@ from sqlalchemy import Index, BigInteger, JSON, Boolean, UniqueConstraint
|
||||||
|
|
||||||
# Environment: Postgres/TimescaleDB connection URL
|
# Environment: Postgres/TimescaleDB connection URL
|
||||||
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://postgres:password@localhost:5432/dereth")
|
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://postgres:password@localhost:5432/dereth")
|
||||||
# Async database client with explicit connection pool configuration
|
# Async database client with explicit connection pool configuration and query timeout
|
||||||
database = Database(DATABASE_URL, min_size=5, max_size=20)
|
database = Database(DATABASE_URL, min_size=5, max_size=100, command_timeout=120)
|
||||||
# Metadata for SQLAlchemy Core
|
# Metadata for SQLAlchemy Core
|
||||||
# SQLAlchemy metadata container for table definitions
|
# SQLAlchemy metadata container for table definitions
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
|
|
@ -24,7 +24,6 @@ telemetry_events = Table(
|
||||||
# Time-series hypertable storing raw telemetry snapshots from plugins
|
# Time-series hypertable storing raw telemetry snapshots from plugins
|
||||||
"telemetry_events",
|
"telemetry_events",
|
||||||
metadata,
|
metadata,
|
||||||
Column("id", Integer, primary_key=True),
|
|
||||||
Column("character_name", String, nullable=False, index=True),
|
Column("character_name", String, nullable=False, index=True),
|
||||||
Column("char_tag", String, nullable=True),
|
Column("char_tag", String, nullable=True),
|
||||||
Column("session_id", String, nullable=False, index=True),
|
Column("session_id", String, nullable=False, index=True),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue