shaliz-kong commited on
Commit Β·
0429c16
1
Parent(s): ba09259
regactored deps to include upstash
Browse files- app/deps.py +2 -3
app/deps.py
CHANGED
|
@@ -22,7 +22,7 @@ import threading
|
|
| 22 |
# Type checking imports
|
| 23 |
if TYPE_CHECKING:
|
| 24 |
try:
|
| 25 |
-
|
| 26 |
except Exception:
|
| 27 |
pass
|
| 28 |
|
|
@@ -30,7 +30,6 @@ if TYPE_CHECKING:
|
|
| 30 |
import duckdb
|
| 31 |
from fastapi import HTTPException, Header
|
| 32 |
from upstash_redis import Redis
|
| 33 |
-
import redis as redis_py # For TCP Redis
|
| 34 |
|
| 35 |
# ββ Configuration βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 36 |
# Multi-tenant DuckDB base path
|
|
@@ -73,7 +72,7 @@ def timing_metric(org_id: str, operation: str):
|
|
| 73 |
duration_ms = (time.time() - start) * 1000
|
| 74 |
_metrics_registry["db_query_duration_ms"][f"{org_id}:{operation}"].append(duration_ms)
|
| 75 |
return result
|
| 76 |
-
except Exception
|
| 77 |
track_error(org_id, f"{operation}_error")
|
| 78 |
raise
|
| 79 |
return wrapper
|
|
|
|
| 22 |
# Type checking imports
|
| 23 |
if TYPE_CHECKING:
|
| 24 |
try:
|
| 25 |
+
pass
|
| 26 |
except Exception:
|
| 27 |
pass
|
| 28 |
|
|
|
|
| 30 |
import duckdb
|
| 31 |
from fastapi import HTTPException, Header
|
| 32 |
from upstash_redis import Redis
|
|
|
|
| 33 |
|
| 34 |
# ββ Configuration βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 35 |
# Multi-tenant DuckDB base path
|
|
|
|
| 72 |
duration_ms = (time.time() - start) * 1000
|
| 73 |
_metrics_registry["db_query_duration_ms"][f"{org_id}:{operation}"].append(duration_ms)
|
| 74 |
return result
|
| 75 |
+
except Exception:
|
| 76 |
track_error(org_id, f"{operation}_error")
|
| 77 |
raise
|
| 78 |
return wrapper
|