This commit is contained in:
unknown
2026-03-21 07:26:38 +09:00
parent 166d94fca4
commit 40150cd66d
406 changed files with 34179 additions and 55658 deletions
+34 -22
View File
@@ -17,18 +17,22 @@ INSTANCE_DIR = BASE_DIR / "backend" / "instance"
INSTANCE_DIR.mkdir(parents=True, exist_ok=True)
# data/ 하위 보조 디렉토리
(DATA_DIR / "logs").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "uploads").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "temp_zips").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "xml").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "system" / "logs").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "system" / "backup").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "system" / "archive").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "system" / "mac_backup").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "temp" / "uploads").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "temp" / "zips").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "temp" / "staging").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "repository" / "xml").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "repository" / "mac").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "repository" / "guid_file").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "repository" / "gpu_serial").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "scripts").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "idrac_info").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "mac").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "guid_file").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "gpu_serial").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "mac_backup").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "server_list").mkdir(parents=True, exist_ok=True)
(DATA_DIR / "temp_ip").mkdir(parents=True, exist_ok=True)
class Config:
@@ -63,18 +67,26 @@ class Config:
TELEGRAM_CHAT_ID = os.environ.get("TELEGRAM_CHAT_ID", "")
# ── 앱 폴더 경로 (문자열)
UPLOAD_FOLDER = (DATA_DIR / "temp_ip").as_posix()
BACKUP_FOLDER = (DATA_DIR / "backup").as_posix()
TEMP_ZIP_FOLDER = (DATA_DIR / "temp_zips").as_posix()
XML_FOLDER = (DATA_DIR / "xml").as_posix()
# [Restructured]
UPLOAD_FOLDER = (DATA_DIR / "temp" / "uploads").as_posix()
BACKUP_FOLDER = (DATA_DIR / "system" / "backup").as_posix()
TEMP_ZIP_FOLDER = (DATA_DIR / "temp" / "zips").as_posix()
XML_FOLDER = (DATA_DIR / "repository" / "xml").as_posix() # Assuming xml fits in repository
SCRIPT_FOLDER = (DATA_DIR / "scripts").as_posix()
IDRAC_INFO_FOLDER = (DATA_DIR / "idrac_info").as_posix()
MAC_FOLDER = (DATA_DIR / "mac").as_posix()
GUID_FOLDER = (DATA_DIR / "guid_file").as_posix()
GPU_FOLDER = (DATA_DIR / "gpu_serial").as_posix()
MAC_BACKUP_FOLDER = (DATA_DIR / "mac_backup").as_posix()
SERVER_LIST_FOLDER = (DATA_DIR / "server_list").as_posix()
LOG_FOLDER = (DATA_DIR / "logs").as_posix()
# Staging area for collection results
IDRAC_INFO_FOLDER = (DATA_DIR / "temp" / "staging").as_posix()
# Final repositories
MAC_FOLDER = (DATA_DIR / "repository" / "mac").as_posix()
GUID_FOLDER = (DATA_DIR / "repository" / "guid_file").as_posix()
GPU_FOLDER = (DATA_DIR / "repository" / "gpu_serial").as_posix()
MAC_BACKUP_FOLDER = (DATA_DIR / "system" / "mac_backup").as_posix()
ARCHIVE_FOLDER = (DATA_DIR / "system" / "archive").as_posix()
SERVER_LIST_FOLDER = (DATA_DIR / "server_list").as_posix() # Keep as is for now or move to repo?
LOG_FOLDER = (DATA_DIR / "system" / "logs").as_posix()
# ── 업로드/파일
ALLOWED_EXTENSIONS = {"xml"}
@@ -82,7 +94,7 @@ class Config:
# ── 페이지네이션/병렬
FILES_PER_PAGE = int(os.getenv("FILES_PER_PAGE", 35))
BACKUP_FILES_PER_PAGE = int(os.getenv("BACKUP_FILES_PER_PAGE", 5))
BACKUP_FILES_PER_PAGE = int(os.getenv("BACKUP_FILES_PER_PAGE", 10))
MAX_WORKERS = int(os.getenv("MAX_WORKERS", 60))
# ── 세션