Skip to content

Commit

Permalink
Parameter name fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zeerayne committed Nov 29, 2024
1 parent 74258f9 commit 735c5fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import pathlib
from asyncio.exceptions import CancelledError, TimeoutError
from datetime import datetime
from typing import List

Expand Down Expand Up @@ -128,7 +129,7 @@ async def _backup_pgdump(
try:
pg_major_version = (await postgres.get_postgres_version(db_host, db_port, db_name, db_user, db_pwd)).major
blobs = "large-objects" if pg_major_version >= 16 else "blobs"
except ConnectionRefusedError as e:
except (ConnectionRefusedError, CancelledError, TimeoutError) as e:
log.error(f"<{ib_name}> {str(e)}")
return core_models.InfoBaseBackupTaskResult(ib_name, False)

Expand Down
2 changes: 1 addition & 1 deletion update.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def _update_info_base(ib_name, dry=False):
# Процесс не может получить доступ к файлу, так как этот файл занят другим процессом.
pause = (random.randint(0, 100_000)) / 10_000
# Обновляет информационную базу и конфигурацию БД
await execute_v8_command(ib_name, v8_command, log_filename, permission_code, external_pause=pause)
await execute_v8_command(ib_name, v8_command, log_filename, permission_code, create_subprocess_pause=pause)
if is_multiupdate:
# Если в цепочке несколько обновлений, то после каждого проверяет версию ИБ,
# и продолжает только в случае, если ИБ обновилась.
Expand Down

0 comments on commit 735c5fe

Please sign in to comment.