mirror of
https://github.com/flibusta-apps/meilie_updater.git
synced 2025-12-06 07:05:37 +01:00
Fix bug
This commit is contained in:
@@ -42,6 +42,8 @@ async def update_books(ctx) -> bool:
|
|||||||
index = meili.index("books")
|
index = meili.index("books")
|
||||||
|
|
||||||
postgres = await get_postgres_connection()
|
postgres = await get_postgres_connection()
|
||||||
|
|
||||||
|
async with postgres.transaction():
|
||||||
cursor = await postgres.cursor(
|
cursor = await postgres.cursor(
|
||||||
"SELECT id, title, lang FROM books WHERE is_deleted = 'f';"
|
"SELECT id, title, lang FROM books WHERE is_deleted = 'f';"
|
||||||
)
|
)
|
||||||
@@ -66,6 +68,8 @@ async def update_authors(ctx) -> bool:
|
|||||||
index = meili.index("authors")
|
index = meili.index("authors")
|
||||||
|
|
||||||
postgres = await get_postgres_connection()
|
postgres = await get_postgres_connection()
|
||||||
|
|
||||||
|
async with postgres.transaction():
|
||||||
cursor = await postgres.cursor(
|
cursor = await postgres.cursor(
|
||||||
"SELECT id, first_name, last_name, middle_name, "
|
"SELECT id, first_name, last_name, middle_name, "
|
||||||
" array("
|
" array("
|
||||||
@@ -108,6 +112,8 @@ async def update_sequences(ctx) -> bool:
|
|||||||
index = meili.index("sequences")
|
index = meili.index("sequences")
|
||||||
|
|
||||||
postgres = await get_postgres_connection()
|
postgres = await get_postgres_connection()
|
||||||
|
|
||||||
|
async with postgres.transaction():
|
||||||
cursor = await postgres.cursor(
|
cursor = await postgres.cursor(
|
||||||
"SELECT id, name, "
|
"SELECT id, name, "
|
||||||
" array("
|
" array("
|
||||||
|
|||||||
Reference in New Issue
Block a user