Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python_open_ai
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
python_open_ai
Commits
b8d7159a
Commit
b8d7159a
authored
Apr 10, 2023
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
85126df4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
dist/image_split.exe
+0
-0
image_split.py
+5
-5
No files found.
dist/image_split.exe
View file @
b8d7159a
No preview for this file type
image_split.py
View file @
b8d7159a
...
...
@@ -3,8 +3,8 @@ import os
from
loguru
import
logger
from
Helper
import
RedisCon
from
multiprocessing
import
Process
,
Lock
import
asyncio
import
time
from
asyncio
import
get_event_loop
from
time
import
sleep
import
uuid
import
cv2
import
json
...
...
@@ -202,7 +202,7 @@ class ImageSplit:
def
process_start
(
lock
,
task
):
loop
=
asyncio
.
get_event_loop
()
loop
=
get_event_loop
()
keyword
=
ImageSplit
(
lock
,
task
)
# 生产
loop
.
run_until_complete
(
keyword
.
on_start
())
...
...
@@ -236,8 +236,8 @@ if __name__ == '__main__':
for
p
in
l
:
p
.
join
()
# 当5 个子进程全部执行完,才会执行主进程
time
.
sleep
(
3
)
sleep
(
3
)
except
Exception
as
e
:
logger
.
error
(
e
)
logger
.
info
(
'等待3秒'
)
time
.
sleep
(
3
)
sleep
(
3
)
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