mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Cleanup and improved webmentions support
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import datetime
|
||||
from typing import Any
|
||||
from typing import AsyncGenerator
|
||||
|
||||
@ -23,10 +22,6 @@ async_session = sessionmaker(async_engine, class_=AsyncSession, expire_on_commit
|
||||
Base: Any = declarative_base()
|
||||
|
||||
|
||||
def now() -> datetime.datetime:
|
||||
return datetime.datetime.now(datetime.timezone.utc)
|
||||
|
||||
|
||||
async def get_db_session() -> AsyncGenerator[AsyncSession, None]:
|
||||
async with async_session() as session:
|
||||
try:
|
||||
|
Reference in New Issue
Block a user