Files
ComfyGallery/test_integration.py
T
dinlo b553c957f3 Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 18:43:18 +08:00

23 lines
822 B
Python

# 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()