Fix registry lookups to use cid, remove dead legacy code
- Fix all registry lookups to use "cid" instead of "hash" key - app/routers/recipes.py: asset and effect resolution - tasks/execute_sexp.py: effect config lookups - server_legacy.py references (now deleted) - Prefer IPFS CID over local hash in cache operations - cache_service.py: import_from_ipfs, upload_content - orchestrate.py: plan caching - legacy_tasks.py: node hash tracking Remove ~7800 lines of dead code: - server_legacy.py: replaced by modular app/ structure - tasks/*_cid.py: unused refactoring only imported by server_legacy Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -432,8 +432,8 @@ class CacheService:
|
||||
return None, f"Could not fetch CID {ipfs_cid} from IPFS"
|
||||
|
||||
# Store in cache
|
||||
cached, _ = self.cache.put(tmp_path, node_type="import", move=True)
|
||||
cid = cached.cid
|
||||
cached, ipfs_cid = self.cache.put(tmp_path, node_type="import", move=True)
|
||||
cid = ipfs_cid or cached.cid # Prefer IPFS CID
|
||||
|
||||
# Save to database
|
||||
await self.db.create_cache_item(cid, ipfs_cid)
|
||||
@@ -468,7 +468,7 @@ class CacheService:
|
||||
|
||||
# Store in cache (also stores in IPFS)
|
||||
cached, ipfs_cid = self.cache.put(tmp_path, node_type="upload", move=True)
|
||||
cid = cached.cid
|
||||
cid = ipfs_cid or cached.cid # Prefer IPFS CID
|
||||
|
||||
# Save to database with detected MIME type
|
||||
await self.db.create_cache_item(cid, ipfs_cid)
|
||||
|
||||
Reference in New Issue
Block a user