add GIGAAM_API_URL to .env

This commit is contained in:
poturaevpetr
2025-12-25 22:56:16 +05:00
parent 2a61e8422d
commit 1a573362c9
4 changed files with 33 additions and 15 deletions
+7 -4
View File
@@ -3,8 +3,13 @@
Скрипт для проверки и отправки файлов на распознавание
"""
from autoLoader import process_pending_files
from autoLoader.config import GIGAAM_API_URL
import sys
import logging
from dotenv import load_dotenv
# Загружаем .env файл
load_dotenv()
# Настройка логирования
logging.basicConfig(
@@ -12,18 +17,16 @@ logging.basicConfig(
format='%(asctime)s - %(levelname)s - %(message)s'
)
# URL GigaAM API по умолчанию
DEFAULT_API_URL = "http://localhost:5001/api/call/process"
def main():
"""Главная функция"""
# Получаем параметры из командной строки
api_url = sys.argv[1] if len(sys.argv) > 1 else DEFAULT_API_URL
api_url = sys.argv[1] if len(sys.argv) > 1 else GIGAAM_API_URL
limit = int(sys.argv[2]) if len(sys.argv) > 2 else None
print(f"🚀 Запуск проверки файлов на распознавание")
print(f"📡 API URL: {api_url}")
print(f"📂 Config URL: {GIGAAM_API_URL}")
if limit:
print(f"📊 Лимит: {limit} файлов")
print()