Skip to content

Commit

Permalink
need tests (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: Maxim Kolomeychenko <[email protected]>
Co-authored-by: Nikolai Petukhov <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2024
1 parent 9aa64d0 commit 34853d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ def process_logs(self):
def _process_line(log_line):
# log_line = log_line.decode("utf-8")
msg, res_log, lvl = self.parse_log_line(log_line)
if msg is None:
self.logger.warn(
"Received empty (none) message in log line, will be handled automatically"
)
msg = "empty message"
self._process_report(msg)
output = self.call_event_function(res_log)

Expand Down
4 changes: 4 additions & 0 deletions agent/worker/task_dockerized.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ def process_logs(self):
self.logger.warn("No logs obtained from container.") # check if bug occurred

def _process_report(self, log_msg: str):
if log_msg is None:
self.logger.warn("Received empty (none) message in process task report")
return

err_title, err_desc = None, None
splits = log_msg.split(":")

Expand Down

0 comments on commit 34853d0

Please sign in to comment.