Skip to content

use aiosqlite instead of blocking sqlite3 in tickets - #74

Open
arshnah wants to merge 1 commit into
TheCodeVerseHub:mainfrom
arshnah:fix/tickets-async-db
Open

use aiosqlite instead of blocking sqlite3 in tickets#74
arshnah wants to merge 1 commit into
TheCodeVerseHub:mainfrom
arshnah:fix/tickets-async-db

Conversation

@arshnah

@arshnah arshnah commented Sep 3, 2026

Copy link
Copy Markdown

tickets.py was the only cog using plain sqlite3.connect() inside async handlers instead of aiosqlite like everywhere else. every ticket action (open, close, claim, force close, all the config commands) was blocking the whole event loop for the duration of that db call, so the entire bot would stall while a ticket op was running. switched every call site to aiosqlite, moved the initial table setup + ticket counter fetch into an async cog_load instead of doing sync db work in init.

no behavior change, just makes tickets not freeze everything else while it's doing db stuff.

@arshnah
arshnah requested a review from a team as a code owner September 3, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant