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
39c5df53
authored
2020-07-01 11:15:59 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
modify requirements
1 parent
ad161125
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
requirements/base.txt
requirements/dev.txt
requirements/prd.txt
src/apps/doc/management/commands/doc_process.py
requirements/base.txt
View file @
39c5df5
-r github.txt
aiohttp==3.6.2
async-timeout==3.0.1
attrs==19.3.0
certifi==2016.2.28
chardet==3.0.4
Django==2.1
# django-mysqlpool @ https://github.com/smartfile/django-mysqlpool/archive/master.zip
djangorestframework==3.9.0
djangorestframework-jwt==1.11.0
idna==2.9
...
...
@@ -18,10 +19,7 @@ PyJWT==1.7.1
PyMuPDF==1.17.0
PyMySQL==0.9.3
pytz==2020.1
PyYAML==5.3.1
redis==3.4.1
# simple-config @ http://gitlab.situdata.com/zhouweiqi/simple_config/repository/archive.tar.gz?ref=master
# situlogger @ http://gitlab.situdata.com/zhouweiqi/situlogger/repository/archive.tar.gz?ref=master
six==1.14.0
SQLAlchemy==0.9.10
typing-extensions==3.7.4.2
...
...
requirements/dev.txt
0 → 100644
View file @
39c5df5
-r base.txt
PyYAML==5.3.1
\ No newline at end of file
requirements/prd.txt
0 → 100644
View file @
39c5df5
-r base.txt
supervisor==4.2.0
gunicorn==20.0.4
src/apps/doc/management/commands/doc_process.py
View file @
39c5df5
...
...
@@ -53,7 +53,7 @@ class Command(BaseCommand, LoggerMixin):
doc_id
=
int
(
doc_id_str
)
doc_class
=
HILDoc
if
business_type
==
consts
.
HIL_PREFIX
else
AFCDoc
doc_info
=
doc_class
.
objects
.
filter
(
id
=
doc_id
,
status
=
DocStatus
.
INIT
.
value
)
.
values
(
'id'
,
'metadata_version_id'
,
'document_name'
)
.
first
()
# TODO 查不到时是否为None
'id'
,
'metadata_version_id'
,
'document_name'
)
.
first
()
if
doc_info
is
None
:
self
.
cronjob_log
.
warn
(
'{0} [get_doc_info] [doc completed] [task_str={1}] [is_priority={2}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
))
...
...
@@ -281,7 +281,8 @@ class Command(BaseCommand, LoggerMixin):
loop
.
run_until_complete
(
asyncio
.
wait
(
tasks
))
# loop.close()
wb
.
save
(
excel_path
)
# TODO no sheet (res always [])
# 整合excel文件上传至EDMS
# 整合excel文件
# 上传至EDMS
except
Exception
as
e
:
doc_class
.
objects
.
filter
(
id
=
doc_id
)
.
update
(
status
=
DocStatus
.
PROCESS_FAILED
.
value
)
self
.
cronjob_log
.
error
(
'{0} [process failed] [doc_id={1}] [err={2}]'
.
format
(
self
.
log_base
,
doc_id
,
e
))
...
...
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