MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / _loop

Method _loop

Scripts/Network Tools/Store Scrapper.py:872–899  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

870
871 def start(self) -> None:
872 if self.running:
873 return
874 self.running = True
875 self.thread = threading.Thread(target=self._loop, daemon=True)
876 self.thread.start()
877
878 def stop(self) -> None:
879 self.running = False
880 if self.thread and self.thread.is_alive():
881 self.thread.join(timeout=1.5)
882
883 def _loop(self) -> None:
884 while self.running:
885 with self.lock:
886 elapsed = int(time.time() - self.started_at)
887 phase_label = {
888 "idle": "αναμονή",
889 "start": "έναρξη",
890 "prepare": "προετοιμασία",
891 "fetch": "λήψη",
892 "discover-categories": "εύρεση-κατηγοριών",
893 "scrape-category": "scrape-κατηγορίας",
894 "scrape-product": "scrape-προϊόντος",
895 "save-image": "αποθήκευση-εικόνας",
896 "shopify-api": "shopify-api",
897 "woocommerce-api": "woocommerce-api",
898 "generic-listing": "γενική-λίστα",
899 "done": "ολοκληρώθηκε",
900 }.get(self.phase, self.phase)
901 msg = (
902 f"[LIVE] φάση={phase_label} | κατάστημα={truncate(self.store, 22)} | "

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
truncateFunction · 0.70

Tested by

no test coverage detected