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