mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix scanner's teardown
This commit is contained in:
parent
e22f2c6bae
commit
df7156c935
@ -25,10 +25,12 @@ async def lifespan(_):
|
||||
get_db() as db,
|
||||
KyooClient() as client,
|
||||
TheMovieDatabase() as tmdb,
|
||||
RequestProcessor(db, client, CompositeProvider(tmdb)) as processor,
|
||||
):
|
||||
# creating the processor makes it listen to requests event in pg
|
||||
async with get_db() as db:
|
||||
async with (
|
||||
RequestProcessor(db, client, CompositeProvider(tmdb)) as processor,
|
||||
get_db() as db,
|
||||
):
|
||||
scanner = FsScanner(client, RequestCreator(db))
|
||||
# there's no way someone else used the same id, right?
|
||||
is_master = await db.fetchval("select pg_try_advisory_lock(198347)")
|
||||
|
Loading…
x
Reference in New Issue
Block a user