feat: コントローラー関数をすべてasync(シングルスレッド)に変更
This commit is contained in:
parent
c7bd53897a
commit
7d30331cda
@ -25,7 +25,7 @@ logger = get_logger('生物由来参照')
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/BioSearchList')
|
@router.get('/BioSearchList')
|
||||||
def bio_view(
|
async def bio_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
bio_service: BioViewService = Depends(get_service(BioViewService))
|
bio_service: BioViewService = Depends(get_service(BioViewService))
|
||||||
@ -57,7 +57,7 @@ def bio_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/BioSearchList')
|
@router.post('/BioSearchList')
|
||||||
def search_bio(
|
async def search_bio(
|
||||||
request: Request,
|
request: Request,
|
||||||
bio_form: Optional[BioModel] = Depends(BioModel.as_form),
|
bio_form: Optional[BioModel] = Depends(BioModel.as_form),
|
||||||
bio_service: BioViewService = Depends(get_service(BioViewService)),
|
bio_service: BioViewService = Depends(get_service(BioViewService)),
|
||||||
|
|||||||
@ -8,5 +8,5 @@ router = APIRouter()
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/')
|
@router.get('/')
|
||||||
def healthcheck():
|
async def healthcheck():
|
||||||
return {'status': 'OK'}
|
return {'status': 'OK'}
|
||||||
|
|||||||
@ -30,7 +30,7 @@ logger = get_logger('ログイン')
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/userlogin')
|
@router.get('/userlogin')
|
||||||
def login_user_redirect_view():
|
async def login_user_redirect_view():
|
||||||
auth_query_string = parse.urlencode(
|
auth_query_string = parse.urlencode(
|
||||||
{
|
{
|
||||||
'response_type': 'code',
|
'response_type': 'code',
|
||||||
@ -45,7 +45,7 @@ def login_user_redirect_view():
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/maintlogin')
|
@router.get('/maintlogin')
|
||||||
def login_maintenance_view(request: Request):
|
async def login_maintenance_view(request: Request):
|
||||||
mainte_login = MainteLoginViewModel()
|
mainte_login = MainteLoginViewModel()
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
'maintlogin.html',
|
'maintlogin.html',
|
||||||
@ -61,7 +61,7 @@ def login_maintenance_view(request: Request):
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/maintlogin')
|
@router.post('/maintlogin')
|
||||||
def login(
|
async def login(
|
||||||
response: Response,
|
response: Response,
|
||||||
request: LoginModel = Depends(LoginModel.as_form),
|
request: LoginModel = Depends(LoginModel.as_form),
|
||||||
login_service: LoginService = Depends(get_service(LoginService))
|
login_service: LoginService = Depends(get_service(LoginService))
|
||||||
@ -117,7 +117,7 @@ def login(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/authorize')
|
@router.get('/authorize')
|
||||||
def sso_authorize(
|
async def sso_authorize(
|
||||||
code: Union[str, None] = Depends(code_security),
|
code: Union[str, None] = Depends(code_security),
|
||||||
login_service: LoginService = Depends(get_service(LoginService))
|
login_service: LoginService = Depends(get_service(LoginService))
|
||||||
) -> Response:
|
) -> Response:
|
||||||
|
|||||||
@ -17,7 +17,7 @@ router = APIRouter()
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/', response_class=HTMLResponse)
|
@router.get('/', response_class=HTMLResponse)
|
||||||
def logout_view(
|
async def logout_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
reason: Optional[str] = None,
|
reason: Optional[str] = None,
|
||||||
session: Union[UserSession, None] = Depends(verify_session)
|
session: Union[UserSession, None] = Depends(verify_session)
|
||||||
|
|||||||
@ -35,7 +35,7 @@ router.route_class = AuthenticatedRoute
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/masterMainteMenu', response_class=HTMLResponse)
|
@router.get('/masterMainteMenu', response_class=HTMLResponse)
|
||||||
def menu_view(
|
async def menu_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
@ -75,7 +75,7 @@ def menu_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/instEmpCsvUL', response_class=HTMLResponse)
|
@router.get('/instEmpCsvUL', response_class=HTMLResponse)
|
||||||
def inst_emp_csv_upload_view(
|
async def inst_emp_csv_upload_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
@ -177,7 +177,7 @@ async def inst_emp_csv_upload(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/newInst', response_class=HTMLResponse)
|
@router.post('/newInst', response_class=HTMLResponse)
|
||||||
def new_inst_result_view(
|
async def new_inst_result_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
csv_upload_form: Optional[MasterMainteCsvUpModel] = Depends(MasterMainteCsvUpModel.as_form),
|
csv_upload_form: Optional[MasterMainteCsvUpModel] = Depends(MasterMainteCsvUpModel.as_form),
|
||||||
master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)),
|
master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)),
|
||||||
@ -219,7 +219,7 @@ def new_inst_result_view(
|
|||||||
|
|
||||||
|
|
||||||
@ router.get('/instEmpCsvDL', response_class=HTMLResponse)
|
@ router.get('/instEmpCsvDL', response_class=HTMLResponse)
|
||||||
def inst_emp_csv_download_view(
|
async def inst_emp_csv_download_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
@ -331,7 +331,7 @@ async def inst_emp_csv_download(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/tableOverride', response_class=HTMLResponse)
|
@router.get('/tableOverride', response_class=HTMLResponse)
|
||||||
def table_override_view(
|
async def table_override_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
@ -371,7 +371,7 @@ def table_override_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/tableOverride', response_class=HTMLResponse)
|
@router.post('/tableOverride', response_class=HTMLResponse)
|
||||||
def table_override_result_view(
|
async def table_override_result_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)),
|
master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)),
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
|
|||||||
@ -22,7 +22,7 @@ router.route_class = AuthenticatedRoute
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/', response_class=HTMLResponse)
|
@router.get('/', response_class=HTMLResponse)
|
||||||
def menu_view(
|
async def menu_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
|
|||||||
@ -6,6 +6,6 @@ router = APIRouter()
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/')
|
@router.get('/')
|
||||||
def redirect_to_user_login():
|
async def redirect_to_user_login():
|
||||||
# ルートパスへのアクセスは、顧客ユーザーログイン画面にリダイレクトさせる
|
# ルートパスへのアクセスは、顧客ユーザーログイン画面にリダイレクトさせる
|
||||||
return RedirectResponse(url='/login/userlogin', status_code=status.HTTP_303_SEE_OTHER)
|
return RedirectResponse(url='/login/userlogin', status_code=status.HTTP_303_SEE_OTHER)
|
||||||
|
|||||||
@ -27,7 +27,7 @@ router.route_class = AuthenticatedRoute
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/instSearch')
|
@router.get('/instSearch')
|
||||||
def ultmarc_inst_view(
|
async def ultmarc_inst_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService))
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService))
|
||||||
@ -59,7 +59,7 @@ def ultmarc_inst_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/instSearch')
|
@router.post('/instSearch')
|
||||||
def search_inst(
|
async def search_inst(
|
||||||
request: Request,
|
request: Request,
|
||||||
ultmarc_inst_form: Optional[UltmarcInstSearchModel] = Depends(UltmarcInstSearchModel.as_form),
|
ultmarc_inst_form: Optional[UltmarcInstSearchModel] = Depends(UltmarcInstSearchModel.as_form),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||||
@ -103,7 +103,7 @@ def search_inst(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/instInfo')
|
@router.get('/instInfo')
|
||||||
def ultmarc_inst_info_view(
|
async def ultmarc_inst_info_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
id: str,
|
id: str,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
@ -143,7 +143,7 @@ def ultmarc_inst_info_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/instInfo')
|
@router.post('/instInfo')
|
||||||
def ultmarc_inst_info_search(
|
async def ultmarc_inst_info_search(
|
||||||
request: Request,
|
request: Request,
|
||||||
ultmarc_inst_form: Optional[UltmarcInstInfoModel] = Depends(UltmarcInstInfoModel.as_form),
|
ultmarc_inst_form: Optional[UltmarcInstInfoModel] = Depends(UltmarcInstInfoModel.as_form),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||||
@ -190,7 +190,7 @@ def ultmarc_inst_info_search(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/docSearch')
|
@router.get('/docSearch')
|
||||||
def ultmarc_doctor_view(
|
async def ultmarc_doctor_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService))
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService))
|
||||||
@ -222,7 +222,7 @@ def ultmarc_doctor_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/docSearch')
|
@router.post('/docSearch')
|
||||||
def search_doc(
|
async def search_doc(
|
||||||
request: Request,
|
request: Request,
|
||||||
ultmarc_doctor_form: Optional[UltmarcDoctorSearchModel] = Depends(UltmarcDoctorSearchModel.as_form),
|
ultmarc_doctor_form: Optional[UltmarcDoctorSearchModel] = Depends(UltmarcDoctorSearchModel.as_form),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||||
@ -266,7 +266,7 @@ def search_doc(
|
|||||||
|
|
||||||
|
|
||||||
@router.get('/docInfo')
|
@router.get('/docInfo')
|
||||||
def ultmarc_doctor_info_view(
|
async def ultmarc_doctor_info_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
id: str,
|
id: str,
|
||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
@ -306,7 +306,7 @@ def ultmarc_doctor_info_view(
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/docInfo')
|
@router.post('/docInfo')
|
||||||
def ultmarc_doctor_info_search(
|
async def ultmarc_doctor_info_search(
|
||||||
request: Request,
|
request: Request,
|
||||||
ultmarc_doctor_form: Optional[UltmarcDoctorInfoModel] = Depends(UltmarcDoctorInfoModel.as_form),
|
ultmarc_doctor_form: Optional[UltmarcDoctorInfoModel] = Depends(UltmarcDoctorInfoModel.as_form),
|
||||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user