瀏覽代碼

ignore not_started progress updates

Alex Cheema 7 月之前
父節點
當前提交
90e0e2761f
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      exo/main.py

+ 1 - 0
exo/main.py

@@ -221,6 +221,7 @@ last_broadcast_time = 0
 def throttled_broadcast(shard: Shard, event: RepoProgressEvent):
   global last_broadcast_time
   current_time = time.time()
+  if event.status == "not_started": return
   if event.status == "complete" or current_time - last_broadcast_time >= 0.1:
     last_broadcast_time = current_time
     asyncio.create_task(node.broadcast_opaque_status("", json.dumps({"type": "download_progress", "node_id": node.id, "progress": event.to_dict()})))