MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / flush_all

Method flush_all

store/excel_store_base.py:82–94  ·  view source on GitHub ↗

Flush all Excel store instances and save to files Should be called at the end of crawler execution

(cls)

Source from the content-addressed store, hash-verified

80
81 @classmethod
82 def flush_all(cls):
83 """
84 Flush all Excel store instances and save to files
85 Should be called at the end of crawler execution
86 """
87 with cls._lock:
88 for key, instance in cls._instances.items():
89 try:
90 instance.flush()
91 utils.logger.info(f"[ExcelStoreBase] Flushed instance: {key}")
92 except Exception as e:
93 utils.logger.error(f"[ExcelStoreBase] Error flushing {key}: {e}")
94 cls._instances.clear()
95
96 def __init__(self, platform: str, crawler_type: str = "search"):
97 """

Calls 1

flushMethod · 0.45