Browse Source

ignore not_started progress updates

Alex Cheema 7 tháng trước cách đây
mục cha
commit
90e0e2761f
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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()})))