Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
2e5adf52
Commit
2e5adf52
authored
Jan 21, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c8f4412b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
celery.py
app/celery.py
+6
-1
report_service.py
app/service/report_service.py
+1
-1
No files found.
app/celery.py
View file @
2e5adf52
import
datetime
from
celery
import
Celery
from
celery
import
Celery
from
sqlalchemy
import
and_
,
or_
from
sqlalchemy
import
and_
,
or_
...
@@ -27,6 +29,7 @@ def save_pdf(id, ifa_id, customer_id, pdf_name, type, report_data):
...
@@ -27,6 +29,7 @@ def save_pdf(id, ifa_id, customer_id, pdf_name, type, report_data):
pass
pass
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_diagnose_session
=
tamp_diagnose_app
.
session
tamp_diagnose_session
=
tamp_diagnose_app
.
session
res
=
None
if
type
==
1
:
if
type
==
1
:
res
=
tamp_diagnose_session
.
query
(
HoldReport
)
.
filter
(
and_
(
res
=
tamp_diagnose_session
.
query
(
HoldReport
)
.
filter
(
and_
(
HoldReport
.
id
==
id
,
HoldReport
.
id
==
id
,
...
@@ -44,12 +47,14 @@ def save_pdf(id, ifa_id, customer_id, pdf_name, type, report_data):
...
@@ -44,12 +47,14 @@ def save_pdf(id, ifa_id, customer_id, pdf_name, type, report_data):
))
))
else
:
else
:
return
False
return
False
if
res
.
all
():
res
.
update
({
res
.
update
({
'file'
:
pdf_name
,
'file'
:
pdf_name
,
'update_status'
:
2
,
'update_status'
:
2
,
'update_time'
:
datetime
.
datetime
.
now
()
'update_time'
:
datetime
.
datetime
.
now
()
})
})
return
True
return
True
app/service/report_service.py
View file @
2e5adf52
...
@@ -208,7 +208,7 @@ def make_report(args):
...
@@ -208,7 +208,7 @@ def make_report(args):
record_id
=
report_record
.
id
record_id
=
report_record
.
id
save_pdf
.
delay
(
record_id
,
ifa_id
,
customer_id
,
pdf_name
,
type
,
report_data
)
save_pdf
.
delay
(
record_id
,
ifa_id
,
customer_id
,
pdf_name
,
type
,
report_data
)
return
True
return
{
'record_id'
:
record_id
}
# pid = os.fork()
# pid = os.fork()
# if pid == 0:
# if pid == 0:
# try:
# try:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment