mirror of
https://github.com/clearml/clearml-server
synced 2025-03-03 18:54:20 +00:00
Remove buggy debug code
This commit is contained in:
parent
5cc7199661
commit
d03a931d84
@ -1,5 +1,4 @@
|
||||
from functools import partial
|
||||
from os import getenv
|
||||
|
||||
from flask import request, Response, redirect
|
||||
from werkzeug.datastructures import ImmutableMultiDict
|
||||
@ -14,18 +13,8 @@ from apiserver.service_repo.errors import PathParsingError
|
||||
from apiserver.utilities import json
|
||||
from apiserver.utilities.dicts import nested_set
|
||||
|
||||
|
||||
log = config.logger(__file__)
|
||||
|
||||
log_request_paths = None
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
debug_request = getenv("CLEARML_SERVER_DEBUG_REQUESTS", "")
|
||||
if debug_request:
|
||||
log_request_paths = [path.split("") for path in debug_request.split(",")]
|
||||
except Exception:
|
||||
log.exception("Failed parsing CLEARML_SERVER_DEBUG_REQUESTS")
|
||||
|
||||
|
||||
class RequestHandlers:
|
||||
_request_strip_prefix = config.get("apiserver.request.strip_prefix", None)
|
||||
@ -44,16 +33,6 @@ class RequestHandlers:
|
||||
return f"Content encoding is not supported ({request.content_encoding})", 415
|
||||
|
||||
try:
|
||||
if log_request_paths:
|
||||
try:
|
||||
msg = "\n".join(
|
||||
nested_dict(request)
|
||||
)
|
||||
for path in log_request_paths:
|
||||
log.info()
|
||||
except (KeyError, ValueError, TypeError, AttributeError) as ex:
|
||||
log.error("Failed logging request paths: {}".format(ex))
|
||||
|
||||
call = self._create_api_call(request)
|
||||
load_data_callback = partial(self._load_call_data, req=request)
|
||||
content, content_type, company = ServiceRepo.handle_call(
|
||||
@ -223,7 +202,3 @@ class RequestHandlers:
|
||||
)
|
||||
except Exception as ex:
|
||||
call.set_error_result(msg=ex.args[0] if ex.args else type(ex).__name__)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pass
|
Loading…
Reference in New Issue
Block a user