INNER CODE UNIT · Python

send_failure_summary

jptsantossilva/BEC · bec/main.py:233

    def send_failure_summary(self, timeframe: str) -> None:
        if not self.failures:
            return
        grouped: dict[str, list[str]] = {}
        for (symbol, failed_timeframe), failure in sorted(self.failures.items()):
            detail = f"{symbol} ({failed_timeframe})"
            if failure["available"]:
                detail += (
                    f" {failure['available']}/{failure['required']} candles"
                )
            if failure["error_type"]:
                detail += f" [{failure['error_type']}]"
            grouped.setdefault(failure["reason"], []).append(detail)
        lines = []
        for reason, markets in grouped.items():
            shown = markets[:25]
            suffix = f" (+{len(markets) - 25} more)" if len(markets) > 25 else ""
            lines.append(f"{reason}: {', '.join(shown)}{suffix}")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…