Files
ComfyGallery/test_integration.py
T

23 lines
822 B
Python
Raw Normal View History

2026-05-31 18:43:18 +08:00
# test_integration.py
import time
from database.db_manager import DBManager
from watcher.fs_watcher import FolderWatcher
if __name__ == "__main__":
# Инициализируем менеджер БД (создаст comfygallery.db в корне)
db = DBManager("comfygallery.db")
# Создаем вотчер
watcher = FolderWatcher(db)
# Запускаем отслеживание тестовой папки
watch_dir = "./test_output"
watcher.start_monitoring(watch_dir)
print(f"Слежение запущено за '{watch_dir}'. Поместите туда PNG/JPG из ComfyUI...")
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
print("Остановка мониторинга...")
watcher.stop_monitoring()