INNER CODE UNIT · Python

run_snapshots

itbench-hub/ITBench · scenarios/sre/tools/kubernetes-topology-monitor/main.py:72

        def run_snapshots():
            while True:
                try:
                    topology.save_snapshot()
                    topology.cleanup_old_snapshots(args.max_snapshots)
                    topology.cleanup_old_nodes(max_age_seconds=3600)
                    time.sleep(args.interval)
                except Exception as e:
                    logger.error(f"Snapshot error: {e}")
                    time.sleep(60)

        snapshot_thread = threading.Thread(
            target=run_snapshots,
            daemon=True
        )
        snapshot_thread.start()

        # Start API server

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…