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
033c0499
authored
2020-12-01 14:47:02 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix db connection
1 parent
0968153b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
033c049
...
...
@@ -11,6 +11,7 @@ import requests
import
traceback
from
collections
import
Counter
from
datetime
import
datetime
,
date
from
django
import
db
from
django.utils
import
timezone
from
django.core.management
import
BaseCommand
from
multiprocessing
import
Process
,
Queue
,
Manager
,
Lock
...
...
@@ -731,6 +732,7 @@ class Command(BaseCommand, LoggerMixin):
# EDMS异常:下载异常-->回队列-->邮件;上传异常-->重新上传队列-->邮件
# 算法异常:第一道异常-->识别失败-->邮件;第二道异常-->识别失败-->邮件
def
handle
(
self
,
*
args
,
**
kwargs
):
db
.
close_old_connections
()
lock
=
Lock
()
with
Manager
()
as
manager
:
error_list
=
manager
.
list
()
...
...
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