Commit 9cf72fd9 authored by 陈涛's avatar 陈涛

修改bug

parent df36cf9f
...@@ -30,7 +30,6 @@ fund_type_map = { ...@@ -30,7 +30,6 @@ fund_type_map = {
async def create( async def create(
request: Request, request: Request,
create_fund: CreateFund, create_fund: CreateFund,
background_tasks: BackgroundTasks,
user: User = Depends(get_current_user), user: User = Depends(get_current_user),
fund_collect: AgnosticCollection = Depends(get_fund_collect) fund_collect: AgnosticCollection = Depends(get_fund_collect)
): ):
...@@ -41,7 +40,6 @@ async def create( ...@@ -41,7 +40,6 @@ async def create(
response_model = fund_type_map[data['fund_type']] response_model = fund_type_map[data['fund_type']]
await fund_collect.insert_one(data) await fund_collect.insert_one(data)
background_tasks.add_task(calculate_nav_task, data["id"])
scheduler = request.app.state.scheduler scheduler = request.app.state.scheduler
job_id = f"calculate_nav_{data['id']}" job_id = f"calculate_nav_{data['id']}"
time_obj = datetime.datetime.strptime(data["settlement_time"], "%H:%M") time_obj = datetime.datetime.strptime(data["settlement_time"], "%H:%M")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment