File tree Expand file tree Collapse file tree 5 files changed +23
-8
lines changed
Expand file tree Collapse file tree 5 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 123123 " Bash(wsl:*)" ,
124124 " Bash(.venv/Scripts/python.exe -m uvicorn:*)" ,
125125 " Bash(.venv\\ Scripts\\ python.exe -m uvicorn:*)" ,
126- " Bash(docker inspect:*)"
126+ " Bash(docker inspect:*)" ,
127+ " Bash(docker cp \" $file\" secondbrain-app:/takeout_local/)" ,
128+ " Bash(do docker cp \" $file\" secondbrain-app:/takeout_local/)" ,
129+ " Bash(docker cp:*)"
127130 ],
128131 "deny" : [],
129132 "additionalDirectories" : []
Original file line number Diff line number Diff line change @@ -160,7 +160,10 @@ async def _run_processing(self) -> None:
160160 try :
161161 # Get all zip files to process
162162 # Check if running in Docker or locally
163- if os .path .exists ("/takeout" ):
163+ if os .path .exists ("/takeout_local" ) and list (Path ("/takeout_local" ).glob ("*.zip" )):
164+ takeout_path = Path ("/takeout_local" ) # Docker local copy
165+ print (f"📁 Using Docker local copy: { takeout_path } " )
166+ elif os .path .exists ("/takeout" ) and list (Path ("/takeout" ).glob ("*.zip" )):
164167 takeout_path = Path ("/takeout" ) # Docker mount
165168 print (f"📁 Using Docker mount: { takeout_path } " )
166169 elif os .path .exists ("G:/My Drive/Takeout" ):
@@ -180,9 +183,8 @@ async def _run_processing(self) -> None:
180183 print (f"📊 Total files in directory: { len (all_files )} " )
181184 zip_files = sorted (takeout_path .glob ("*.zip" ))
182185 print (f"📦 Total zip files found: { len (zip_files )} " )
183- # Filter for the ones we want
184- zip_files = sorted ([f for f in zip_files
185- if "-1-" in f .name or f .name .endswith ("-032.zip" )])
186+ # Process ALL zip files
187+ zip_files = sorted (zip_files )
186188 print (f"✅ Filtered zip files to process: { len (zip_files )} " )
187189 else :
188190 print (f"❌ Path does not exist: { takeout_path } " )
Original file line number Diff line number Diff line change 55
66import asyncio
77import io
8+ import os
89import sys
910
1011# Force UTF-8 encoding for Windows console
3839from app .core .service_config import config
3940
4041# Get all configuration from central source
41- TAKEOUT_PATH = config .TAKEOUT_PATH
42+ # Use Windows path if available, otherwise Docker mount
43+ if os .path .exists ("G:/My Drive/Takeout" ):
44+ TAKEOUT_PATH = "G:/My Drive/Takeout"
45+ else :
46+ TAKEOUT_PATH = config .TAKEOUT_PATH
4247CLIP_SERVICE_URL = config .get_clip_url ()
4348LLAVA_SERVICE_URL = config .get_llava_url ()
4449DATABASE_URL = config .get_database_url ()
@@ -208,6 +213,11 @@ async def process_image(
208213 """Process a single image: generate embedding and store in database"""
209214
210215 try :
216+ # Skip tiny files (likely corrupted)
217+ if len (image_data ) < 100 :
218+ print (f" ⏭️ Skipping { file_name } (too small, likely corrupted)" )
219+ return False
220+
211221 # Check if already processed
212222 async with self .pool .acquire () as conn :
213223 exists = await conn .fetchval (
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ services:
1818 volumes :
1919 - .:/app:rw
2020 - /app/.venv # Exclude .venv from mount
21- - " ./takeout: /takeout:ro" # Mount local takeout folder
21+ - " G: \\ My Drive \\ Takeout: /takeout:ro" # Mount Google Drive Takeout folder (Windows format)
2222 depends_on :
2323 postgres :
2424 condition : service_healthy
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def test_root_endpoint(self):
5151
5252 data = response .json ()
5353 assert data ["environment" ] == "testing"
54- assert data ["version" ] == "4.2.3 "
54+ assert data ["version" ] == "5.0.0 "
5555 assert "ready" in data
5656
5757 def test_health_endpoint (self ):
You can’t perform that action at this time.
0 commit comments