Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
b4cb7fb2
Commit
b4cb7fb2
authored
Jun 03, 2025
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sid iccid map add time sleep to emit open files 2025-6-3 14:16
parent
4db55b55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
sid_iccid_map.py
unify_api/modules/zhiwei_u/service/sid_iccid_map.py
+5
-0
No files found.
unify_api/modules/zhiwei_u/service/sid_iccid_map.py
View file @
b4cb7fb2
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment