shaliz-kong commited on
Commit ·
c80e93b
1
Parent(s): 24b62c3
added a valid type for entity and idustry emmition to reddis
Browse files- app/mapper.py +3 -4
app/mapper.py
CHANGED
|
@@ -192,10 +192,9 @@ def _fallback_combined(org_id: str, source_id: str) -> tuple[dict, dict]:
|
|
| 192 |
e_key = f"entity:{org_id}:{source_id}"
|
| 193 |
i_key = f"industry:{org_id}:{source_id}"
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
pipe.execute()
|
| 199 |
|
| 200 |
print(f"[fallback] 💾 WRITTEN to Redis: {e_key}, {i_key}")
|
| 201 |
|
|
|
|
| 192 |
e_key = f"entity:{org_id}:{source_id}"
|
| 193 |
i_key = f"industry:{org_id}:{source_id}"
|
| 194 |
|
| 195 |
+
#✅ NEW (Upstash-compatible):
|
| 196 |
+
event_hub.setex(e_key, 3600, json.dumps(entity_info))
|
| 197 |
+
event_hub.setex(i_key, 3600, json.dumps(industry_info))
|
|
|
|
| 198 |
|
| 199 |
print(f"[fallback] 💾 WRITTEN to Redis: {e_key}, {i_key}")
|
| 200 |
|