Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
53a481dc
authored
2024-09-25 19:18:41 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/add_log_20240924' into feature/uat-tmp
2 parents
37716c11
77f818a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
53a481d
...
...
@@ -1669,6 +1669,7 @@ class Command(BaseCommand, LoggerMixin):
self
.
log_base
,
img_path
,
traceback
.
format_exc
()))
else
:
try
:
self
.
online_log
.
info
(
'{0} [del json_data_1] [img={1}] '
.
format
(
self
.
log_base
,
img_path
))
del
json_data_1
# /data/bmw-ocr-data/AFC/tmp/6/img/page_0_img_0.jpeg
# AFC_2
...
...
@@ -1686,6 +1687,7 @@ class Command(BaseCommand, LoggerMixin):
finish_queue
.
put
(
task_str
)
self
.
online_log
.
info
(
'{0} [ocr_1 to finish_queue] [img={1}] '
.
format
(
self
.
log_base
,
img_path
))
del
todo_count_dict
[
task_str
]
self
.
online_log
.
info
(
'{0} [del todo_count_dict] [img={1}] '
.
format
(
self
.
log_base
,
img_path
))
else
:
todo_count_dict
[
task_str
]
=
todo_count
-
1
self
.
online_log
.
info
(
'{0} [after lock] [img={1}] '
.
format
(
self
.
log_base
,
img_path
))
...
...
@@ -1698,6 +1700,7 @@ class Command(BaseCommand, LoggerMixin):
while
len
(
error_list
)
==
0
or
not
img_queue
.
empty
()
or
not
finish_queue
.
empty
():
try
:
task_str
=
finish_queue
.
get
(
block
=
False
)
self
.
online_log
.
info
(
'{0} [res_2_wb] [finish_queue.get]'
.
format
(
self
.
log_base
))
except
Exception
as
e
:
self
.
online_log
.
info
(
'{0} [res_2_wb] [queue empty]'
.
format
(
self
.
log_base
))
time
.
sleep
(
self
.
sleep_time_task_get
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment