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
48a1a358
authored
2025-01-10 13:31:23 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
catch thread
1 parent
b71dd59e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
48a1a35
...
...
@@ -3715,8 +3715,11 @@ def se_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res
@app.task
def
fsm_compare
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
=
True
,
is_cms
=
False
):
try
:
producer_thread_fsm
=
threading
.
Thread
(
target
=
fsm_compare_thread
,
args
=
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
,
is_cms
))
producer_thread_fsm
.
start
()
except
Exception
as
e
:
compare_log
.
info
(
'[fsm thread error] [error={0}]'
.
format
(
traceback
.
format_exc
()))
def
fsm_compare_thread
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
=
True
,
is_cms
=
False
):
...
...
@@ -3781,8 +3784,11 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id,
@app.task
def
compare
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
=
True
,
is_cms
=
False
):
try
:
producer_thread
=
threading
.
Thread
(
target
=
compare_thread
,
args
=
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
,
is_cms
))
producer_thread
.
start
()
except
Exception
as
e
:
compare_log
.
info
(
'[thread error] [error={0}]'
.
format
(
traceback
.
format_exc
()))
def
compare_thread
(
application_id
,
application_entity
,
uniq_seq
,
ocr_res_id
,
is_ca
=
True
,
is_cms
=
False
):
# POS: application_id, application_entity, uniq_seq, None
...
...
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