Skip to content

Commit

Permalink
code fixes for pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
Didier Durand committed Feb 25, 2024
1 parent 0175cbb commit d80bc9a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/q_list_data_source_sync_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ def list_data_source_sync_jobs_with_details(app_id: str = "", idx_id: str = "",
duration = job["endTime"] - job["startTime"]
if "duration_s" in job:
raise ValueError("duration_s dict key already present")
else:
job["duration"] = duration
job["duration_s"] = duration.seconds
if "metrics" in job and "documentsScanned" in job["metrics"]:
job["metrics"]["scanRate"] = str(int(job["metrics"]["documentsScanned"]) / int(duration.seconds))
job["duration"] = duration
job["duration_s"] = duration.seconds
if "metrics" in job and "documentsScanned" in job["metrics"]:
job["metrics"]["scanRate"] = str(int(job["metrics"]["documentsScanned"]) / int(duration.seconds))
return jobs
return None

Expand Down

0 comments on commit d80bc9a

Please sign in to comment.