feat: Add automated item checking scheduler service and new dashboard item display components.

This commit is contained in:
Michael committed 2025-12-01 17:07:50 +01:00
1 parent f0e1c6668d
commit 6eb821c40d
3 files changed
+24 -12

No files matched your search

+12
View File
@@ -127,6 +127,18 @@ async def process_item_check(item_id: int):
if not screenshot_path:
raise Exception("Failed to capture screenshot")
# Update the main item screenshot for the UI
try:
import shutil
import os
dest_path = f"/app/screenshots/item_{item_id}.png"
# Ensure directory exists
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
shutil.copy2(screenshot_path, dest_path)
logger.info(f"Updated main screenshot for item {item_id}")
except Exception as e:
logger.error(f"Failed to update main screenshot: {e}")
if not (ai_result := await AIService.analyze_image(screenshot_path, page_text=page_text)):
raise Exception("AI analysis failed")