mirror of
https://codeberg.org/wownero/wowlet-backend.git
synced 2026-10-17 05:51:45 +02:00
CCS: error handling
This commit is contained in:
+11
-6
@@ -183,14 +183,19 @@ class FeatherApi:
|
|||||||
if ccs and app.config["DEBUG"]:
|
if ccs and app.config["DEBUG"]:
|
||||||
return ccs
|
return ccs
|
||||||
|
|
||||||
content = await httpget(f"https://ccs.getmonero.org/index.php/projects", json=True)
|
try:
|
||||||
|
content = await httpget(f"https://ccs.getmonero.org/index.php/projects", json=True)
|
||||||
|
|
||||||
data = [p for p in content["data"] if p["state"] == "FUNDING-REQUIRED" and p['address'] != '8Bok6rt3aCYE41d3YxfMfpSBD6rMDeV9cchSM99KwPFi5GHXe28pHXcYzqtej52TQJT4M8zhfyaoCXDoioR7nSfpC7St48K']
|
data = [p for p in content["data"] if p["state"] == "FUNDING-REQUIRED" and p['address'] != '8Bok6rt3aCYE41d3YxfMfpSBD6rMDeV9cchSM99KwPFi5GHXe28pHXcYzqtej52TQJT4M8zhfyaoCXDoioR7nSfpC7St48K']
|
||||||
for p in data:
|
for p in data:
|
||||||
p.update({"url": settings.urls['ccs']+'/funding-required/'})
|
p.update({"url": settings.urls['ccs']+'/funding-required/'})
|
||||||
|
|
||||||
await cache.set("ccs", json.dumps(data))
|
await cache.set("ccs", json.dumps(data))
|
||||||
return data
|
return data
|
||||||
|
except Exception as ex:
|
||||||
|
app.logger.error(f"Error parsing CCS data: {ex}")
|
||||||
|
|
||||||
|
return ccs
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def after_ccs(data):
|
async def after_ccs(data):
|
||||||
|
|||||||
Reference in New Issue
Block a user