Skip to content

Commit

Permalink
HH-229669: some logs for /registration/applicant rout
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmirvalishev authored and IlinIAn committed Sep 13, 2024
1 parent 79f3986 commit 9d1fa62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontik/handler_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ async def serve_tornado_request(

process_request_task = asyncio.create_task(process_request(frontik_app, asgi_app, tornado_request))

if tornado_request.path == '/registration/applicant':
log.info('requested connection is None: %s', tornado_request.connection is None)

assert tornado_request.connection is not None
tornado_request.connection.set_close_callback( # type: ignore
partial(_on_connection_close, tornado_request, process_request_task)
Expand Down Expand Up @@ -70,6 +73,8 @@ async def process_request(
if not accepted:
status, reason, headers, data = make_not_accepted_response()
else:
if tornado_request.path == '/registration/applicant':
log.info('execute_page in /registration/applicant')
status, reason, headers, data = await execute_page(frontik_app, asgi_app, tornado_request)
headers.add(
'Server-Timing', f'frontik;desc="frontik execution time";dur={tornado_request.request_time()!s}'
Expand Down Expand Up @@ -97,6 +102,8 @@ async def execute_page(
if scope['route'] is None:
status, reason, headers, data = await make_not_found_response(frontik_app, tornado_request, debug_mode)
elif scope['page_cls'] is not None:
if tornado_request.path == '/registration/applicant':
log.info('execute_tornado_page in /registration/applicant')
status, reason, headers, data = await execute_tornado_page(frontik_app, tornado_request, scope, debug_mode)
else:
status, reason, headers, data = await execute_asgi_page(
Expand Down

0 comments on commit 9d1fa62

Please sign in to comment.