uranusjr commented on pull request #15195:
URL: https://github.com/apache/airflow/pull/15195#issuecomment-850802177


   If you can refactor this to something like
   
   ```python
   Row = namedtuple("Row", "file_path processor_pid runtime num_dags num_errors 
last_runtime last_run")
   
   rows = []
   for file_path in known_file_paths:
       ...
       row = Row(
           file_path=file_path,
           processor_pid=processor_pid,
           runtime=runtime,
           num_dags=num_dags,
           num_errors=num_errors,
           last_runtime=last_runtime,
           last_run=last_run,
       )
       rows.append(row)
   rows = sorted(rows, lambda row: row.last_runtime or 0.0)
   ```
   
   Then I think this is fine without a unit test (since the logic is obvious 
enough).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to