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
75499efe
authored
2025-08-29 15:32:49 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
FIX:调整原流程只处理排队中的情况
1 parent
d619642f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
75499ef
...
...
@@ -144,11 +144,11 @@ class Command(BaseCommand, LoggerMixin):
if
doc
is
None
:
self
.
online_log
.
warn
(
'{0} [get_doc_info] [doc not exist] [task_str={1}] [is_priority={2}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
))
return
None
,
None
,
None
,
None
elif
doc
.
status
!=
DocStatus
.
INIT
.
value
:
return
None
,
None
,
None
,
None
,
None
elif
doc
.
status
!=
DocStatus
.
INIT
.
value
or
(
re_ocr_flag
==
'Y'
and
doc
.
status
!=
DocStatus
.
PROCESS_FAILED
.
value
)
:
self
.
online_log
.
warn
(
'{0} [get_doc_info] [doc status error] [task_str={1}] [is_priority={2}] '
'[doc_status={3}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
,
doc
.
status
))
return
None
,
None
,
None
,
None
return
None
,
None
,
None
,
None
,
None
doc
.
status
=
DocStatus
.
PROCESSING
.
value
doc
.
start_time
=
timezone
.
now
()
doc
.
save
()
...
...
@@ -158,8 +158,8 @@ class Command(BaseCommand, LoggerMixin):
self
.
log_base
,
traceback
.
format_exc
()))
raise
e
else
:
self
.
online_log
.
info
(
'{0} [get_doc_info] [db save end] [task_str={1}] [is_priority={2}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
))
self
.
online_log
.
info
(
'{0} [get_doc_info] [db save end] [task_str={1}] [is_priority={2}]
[re_ocr_flag={3}]
'
.
format
(
self
.
log_base
,
task_str
,
is_priority
,
re_ocr_flag
))
return
doc
,
business_type
,
rebuild_task_str
,
classify_1_str
,
re_ocr_flag
# def pdf_download(self, doc, pdf_path):
...
...
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