Commit b4cb7fb2 authored by ZZH's avatar ZZH

sid iccid map add time sleep to emit open files 2025-6-3 14:16

parent 4db55b55
...@@ -185,6 +185,7 @@ async def load_iccid(sid): ...@@ -185,6 +185,7 @@ async def load_iccid(sid):
async def update_all(): async def update_all():
sid_iccids, fail_sid, tmp = [], [], [] sid_iccids, fail_sid, tmp = [], [], []
sid_total = await load_all_sids() sid_total = await load_all_sids()
print(f"sid total:{len(sid_total)}")
for i, sid in enumerate(sid_total, start=1): for i, sid in enumerate(sid_total, start=1):
tmp.append(sid) tmp.append(sid)
if i % 200 and i < len(sid_total): if i % 200 and i < len(sid_total):
...@@ -199,6 +200,8 @@ async def update_all(): ...@@ -199,6 +200,8 @@ async def update_all():
tmp = [] tmp = []
time.sleep(180)
if sid_iccids: if sid_iccids:
await batch_insert(sid_iccids) await batch_insert(sid_iccids)
...@@ -219,6 +222,8 @@ async def update_all(): ...@@ -219,6 +222,8 @@ async def update_all():
else: else:
fail_two.append(_sid) fail_two.append(_sid)
time.sleep(180)
if sid_iccids: if sid_iccids:
await batch_insert(sid_iccids) await batch_insert(sid_iccids)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment