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
c011a3cd
authored
2022-01-26 18:59:17 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
36ca3f9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
c011a3c
...
...
@@ -93,7 +93,7 @@ class Command(BaseCommand, LoggerMixin):
task_str
,
is_priority
=
rh
.
dequeue
()
if
task_str
is
None
:
self
.
online_log
.
info
(
'{0} [get_doc_info] [queue empty]'
.
format
(
self
.
log_base
))
return
None
,
None
,
None
,
None
,
None
return
None
,
None
,
None
,
None
self
.
online_log
.
info
(
'{0} [get_doc_info] [task={1}] [is_priority={2}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
))
...
...
@@ -114,11 +114,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
,
None
return
None
,
None
,
None
,
None
elif
doc
.
status
!=
DocStatus
.
INIT
.
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
,
None
return
None
,
None
,
None
,
None
doc
.
status
=
DocStatus
.
PROCESSING
.
value
doc
.
start_time
=
timezone
.
now
()
doc
.
save
()
...
...
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