MCPcopy
hub / github.com/tickmao/Novel / sync_public_stats

Method sync_public_stats

scripts/source_inventory.py:300–323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 return metadata
299
300 def sync_public_stats(self) -> Dict[str, Optional[str]]:
301 updated_at = datetime.now().isoformat()
302 try:
303 success = SourceUpdater(self.project_root).run_update()
304 if success:
305 return {
306 "success": True,
307 "status": "success",
308 "updated_at": updated_at,
309 "error": None,
310 }
311 return {
312 "success": False,
313 "status": "failed",
314 "updated_at": updated_at,
315 "error": "README 或站点统计同步失败",
316 }
317 except Exception as e:
318 return {
319 "success": False,
320 "status": "failed",
321 "updated_at": updated_at,
322 "error": str(e),
323 }
324
325 def inventory_status(self) -> Dict:
326 working = self.load_working_sources()

Callers 1

build_inventoryMethod · 0.95

Calls 2

SourceUpdaterClass · 0.90
run_updateMethod · 0.45

Tested by

no test coverage detected