This commit is contained in:
2022-03-19 01:26:25 +03:00
parent cf68c9557d
commit 036c1b92bb

View File

@@ -42,6 +42,8 @@ async def update_books(ctx) -> bool:
index = meili.index("books")
postgres = await get_postgres_connection()
async with postgres.transaction():
cursor = await postgres.cursor(
"SELECT id, title, lang FROM books WHERE is_deleted = 'f';"
)
@@ -66,6 +68,8 @@ async def update_authors(ctx) -> bool:
index = meili.index("authors")
postgres = await get_postgres_connection()
async with postgres.transaction():
cursor = await postgres.cursor(
"SELECT id, first_name, last_name, middle_name, "
" array("
@@ -108,6 +112,8 @@ async def update_sequences(ctx) -> bool:
index = meili.index("sequences")
postgres = await get_postgres_connection()
async with postgres.transaction():
cursor = await postgres.cursor(
"SELECT id, name, "
" array("