Skip to content

Commit a23169b

Browse files
committed
remove dead function
1 parent 53a7437 commit a23169b

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

src/redfetch/listener.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def cors_middleware(request: web.Request, handler):
3030

3131

3232
async def _get_root_version_local_async(db_name: str, resource_id: str) -> Optional[int]:
33-
"""Async equivalent of store.get_root_version_local for roots (parent_id=0)."""
33+
"""Async helper to fetch root version_local (parent_id=0)."""
3434
db_path = store.get_db_path(db_name)
3535
try:
3636
async with aiosqlite.connect(db_path, timeout=30.0) as conn:
@@ -168,7 +168,6 @@ async def handle_category_map(request: web.Request) -> web.Response:
168168
async def handle_special_resource_ids(request: web.Request) -> web.Response:
169169
status = compute_special_status(None)
170170
special_resource_ids = [int(rid) for rid, info in status.items() if info["is_special"]]
171-
print(f"special_resource_ids: {special_resource_ids}")
172171
return web.json_response(special_resource_ids)
173172

174173

src/redfetch/store.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -372,19 +372,6 @@ def _normalize_parent_ids(cursor) -> None:
372372
cursor.execute("UPDATE downloads SET parent_id=0 WHERE parent_id IS NULL")
373373

374374

375-
def get_root_version_local(cursor, resource_id: str) -> int | None:
376-
"""Return version_local for a root (parent_id=0) resource, or None if absent."""
377-
try:
378-
cursor.execute(
379-
"SELECT version_local FROM downloads WHERE parent_id = 0 AND resource_id = ?",
380-
(int(resource_id),),
381-
)
382-
row = cursor.fetchone()
383-
return row[0] if row else None
384-
except Exception:
385-
return None
386-
387-
388375
# ===== Async Database Operations =====
389376

390377
async def apply_updates(db_path: str, updates: list[tuple[str, int, bool, str | None]]) -> None:

0 commit comments

Comments
 (0)