Skip to content

Commit

Permalink
Merge pull request #142 from DalgoT4D/reduce-logging
Browse files Browse the repository at this point in the history
reduce logging
  • Loading branch information
fatchat authored Jul 22, 2024
2 parents 634b7c8 + cb42887 commit bcf6033
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions proxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,13 @@ def get_flow_runs(
raise TypeError("limit must be an integer")
if limit < 0:
raise ValueError("limit must be positive")
logger.info("deployment_id=%s, limit=%s", deployment_id, limit)
try:
flow_runs = get_flow_runs_by_deployment_id(deployment_id, limit, start_time_gt)
except Exception as error:
logger.exception(error)
raise HTTPException(
status_code=400, detail="failed to fetch flow_runs for deployment"
) from error
logger.info("Found flow runs for deployment ID: %s", deployment_id)
return {"flow_runs": flow_runs}


Expand All @@ -525,8 +523,6 @@ def get_flow_run_by_id(request: Request, flow_run_id):
status_code=400, detail="failed to fetch flow_run " + flow_run_id
) from error

logger.info("Found flow run wth id - %s", flow_run_id)

return flow_run


Expand Down Expand Up @@ -558,7 +554,6 @@ def get_flow_run_logs_paginated(request: Request, flow_run_id: str, offset: int
raise TypeError("offset must be an integer")
if offset < 0:
raise ValueError("offset must be positive")
logger.info("flow_run_id=%s, offset=%s", flow_run_id, offset)
try:
return get_flow_run_logs(flow_run_id, offset)
except Exception as error:
Expand All @@ -574,7 +569,6 @@ def get_flow_run_logs_grouped(request: Request, flow_run_id: str):
if not isinstance(flow_run_id, str):
raise TypeError("flow_run_id must be a string")

logger.info("flow_run_id=%s", flow_run_id)
try:
return get_flow_run_logs_v2(flow_run_id)
except Exception as error:
Expand All @@ -589,7 +583,6 @@ def get_read_deployment(request: Request, deployment_id):
"""Fetch deployment and all its details"""
if not isinstance(deployment_id, str):
raise TypeError("deployment_id must be a string")
logger.info("deployment_id=%s", deployment_id)

try:
deployment = get_deployment(deployment_id)
Expand Down
2 changes: 0 additions & 2 deletions proxy/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ def get_deployment(deployment_id: str) -> dict:
if not isinstance(deployment_id, str):
raise TypeError("deployment_id must be a string")
res = prefect_get(f"deployments/{deployment_id}")
logger.info("Fetched deployment with ID: %s", deployment_id)
return res


Expand Down Expand Up @@ -706,7 +705,6 @@ def get_flow_runs_by_deployment_id(
raise TypeError("limit must be an integer")
if limit < 0:
raise ValueError("limit must be a positive integer")
logger.info("fetching flow runs for deployment %s", deployment_id)

query = {
"sort": "START_TIME_DESC",
Expand Down

0 comments on commit bcf6033

Please sign in to comment.