Skip to content

Commit

Permalink
disable showing logs in jobs get_all table
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 committed Aug 6, 2024
1 parent db22e53 commit 80d4ed7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/syft/src/syft/service/job/job_stash.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,14 @@ def summary_html(self) -> str:
return summary_html

def _coll_repr_(self) -> dict[str, Any]:
logs = self.logs(_print=False, stderr=False)
if logs is not None:
log_lines = logs.split("\n")
# [Note]: Disable logs in table, to improve performance
# logs = self.logs(_print=False, stderr=False)
# if logs is not None:
# log_lines = logs.split("\n")
# if len(log_lines) > 2:
# logs = f"... ({len(log_lines)} lines)\n" + "\n".join(log_lines[-2:])

subjobs = self.subjobs
if len(log_lines) > 2:
logs = f"... ({len(log_lines)} lines)\n" + "\n".join(log_lines[-2:])

def default_value(value: str) -> str:
return value if value else "--"
Expand All @@ -504,7 +506,6 @@ def default_value(value: str) -> str:
"# Subjobs": default_value(len(subjobs)),
"Progress": default_value(self.progress),
"ETA": default_value(self.eta_string),
"Logs": default_value(logs),
}

@property
Expand Down

0 comments on commit 80d4ed7

Please sign in to comment.