diff --git a/app/app_config.py b/app/app_config.py index b1221c6..fa394d1 100644 --- a/app/app_config.py +++ b/app/app_config.py @@ -9,7 +9,6 @@ SFM_SMB_BASE_PATH = "//sgo-fc01-r13/inbox-intech" SFM_DEFAULT_INPUT_DIR = r"//sgo-fc01-r13/inbox-intech" ACCESS_SUPPORT_CONTACT = "администратору СФМ" -USER_PATHS_KEY = "user_input_dirs" EDIT_PATH_OPEN_KEY = "edit_path_open" EDIT_PATH_VALUE_KEY = "edit_path_value" # Runtime-only user paths storage. In bank contour we use tmpfs. diff --git a/app/pipeline/config.py b/app/pipeline/config.py index 77c7ae2..7f4bd24 100644 --- a/app/pipeline/config.py +++ b/app/pipeline/config.py @@ -34,11 +34,6 @@ def build_out_dir(base_dir: str, now: datetime | None = None) -> str: return join_path(base_dir, DEFAULT_OUTPUT_DIR_NAME, year, month, day) -def build_run_dir(base_dir: str, run_number: int, now: datetime | None = None) -> str: - out_dir = build_out_dir(base_dir, now) - return join_path(out_dir, str(run_number)) - - def build_error_dir(base_dir: str) -> str: return join_path(base_dir, DEFAULT_ERROR_DIR_NAME) diff --git a/app/pipeline/file_manager.py b/app/pipeline/file_manager.py index 065c96f..82dc3eb 100644 --- a/app/pipeline/file_manager.py +++ b/app/pipeline/file_manager.py @@ -207,15 +207,6 @@ def check_input_dir_access( return _check_samba_dir_access(str(input_dir), samba_conn, "Папка") -def check_network_dir_access( - network_dir: str | Path, samba_conn -) -> tuple[bool, str | None]: - path = Path(network_dir) - if not str(path).startswith("\\\\"): - return False, f"Путь не является сетевым UNC-путем: {path}" - return _check_samba_dir_access(str(path), samba_conn, "Сетевая папка") - - def check_dir_write_access( target_dir: str, samba_conn, source_name: str ) -> tuple[bool, str | None]: diff --git a/app/pipeline/parser.py b/app/pipeline/parser.py index e022e85..3ba7f99 100644 --- a/app/pipeline/parser.py +++ b/app/pipeline/parser.py @@ -2,7 +2,6 @@ from __future__ import annotations import xml.etree.ElementTree as ET from dataclasses import dataclass, field -from pathlib import Path from typing import Iterable from .config import validate_file_name as validate_pipeline_file_name @@ -41,16 +40,6 @@ def validate_file_name(file_name: str) -> bool: return validate_pipeline_file_name(file_name) -def parse_xml_file(file_path: Path) -> FileParseResult: - try: - content = file_path.read_bytes() - except OSError as exc: - result = FileParseResult(file_name=file_path.name) - result.fatal_error = f"Ошибка чтения файла: {exc}" - return result - return parse_xml_content(file_name=file_path.name, xml_content=content) - - def parse_xml_content(file_name: str, xml_content: bytes | str) -> FileParseResult: result = FileParseResult(file_name=file_name) diff --git a/app/pipeline/service.py b/app/pipeline/service.py index 7ef539c..2340e45 100644 --- a/app/pipeline/service.py +++ b/app/pipeline/service.py @@ -364,8 +364,6 @@ def _process_files( ) except Exception as exc: # noqa: BLE001 message = f"{message} Не удалось переместить в Err: {exc}" - if status == "success": - status = "partial" log_lines.append( f"{_now()} | move to Err failed: {remote_file.path}. {exc}" ) diff --git a/app/ui.py b/app/ui.py deleted file mode 100644 index e51e626..0000000 --- a/app/ui.py +++ /dev/null @@ -1,16 +0,0 @@ -from __future__ import annotations - -import streamlit as st - - -def render_profile(profile: dict) -> None: - st.success("Аутентификация через Keycloak Raisa выполнена.") - st.subheader("Профиль пользователя") - st.json( - { - "email": profile.get("email"), - "preferred_username": profile.get("preferred_username"), - "name": profile.get("name") or profile.get("full_name"), - "realm_roles": profile.get("realm_access", {}).get("roles", []), - } - ) diff --git a/main.py b/main.py index de1ad60..1fcf802 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,6 @@ def main() -> None: with center_col: user_id = resolve_user_id() current_input_dir = ensure_user_path_state(user_id) - resolved_input_dir = get_resolved_input_dir(user_id) st.subheader("Подключение к сетевому диску") samba_user = st.text_input( diff --git a/roles.json b/roles.json deleted file mode 100644 index 9e26dfe..0000000 --- a/roles.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/users.json b/users.json deleted file mode 100644 index 9e26dfe..0000000 --- a/users.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file