dsuhinin commented on code in PR #63180:
URL: https://github.com/apache/airflow/pull/63180#discussion_r2996317421


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:
##########
@@ -59,6 +62,19 @@
 }
 
 
+def _batched_ndjson_stream(

Review Comment:
   @jason810496 this is a sample dag with a delay:
   ```
   from datetime import datetime
   import time
   from airflow import DAG
   from airflow.operators.python import PythonOperator
   
   
   def generate_slow_logs(num_logs, logs_per_minute, **context):
       delay = 60.0 / logs_per_minute
       for i in range(num_logs):
           print(f"Log line {i + 1}: This is a test log entry for performance 
testing")
           time.sleep(delay)
   
   
   with DAG(
       dag_id="dynamic_log_with_delay_generator",
       start_date=datetime(2024, 1, 1),
       schedule=None,
       catchup=False,
   ) as dag:
   
       PythonOperator(
           task_id="generate_slow_logs",
           python_callable=generate_slow_logs,
           op_kwargs={
               "num_logs": 15,
               "logs_per_minute": 5,
           },
       )
   ```
   
   please take a look into results:
   <img width="2490" height="710" alt="Screenshot 2026-03-26 at 17 46 24" 
src="https://github.com/user-attachments/assets/7fe8e863-5c94-432b-8e60-d85903fdeffc";
 />
   <img width="2491" height="761" alt="Screenshot 2026-03-26 at 17 46 41" 
src="https://github.com/user-attachments/assets/342d2490-10e8-4676-95c6-37c80f2562e1";
 />
   <img width="2492" height="830" alt="Screenshot 2026-03-26 at 17 47 29" 
src="https://github.com/user-attachments/assets/a6e12ee2-40f3-4792-83f9-bc1034c8d83d";
 />
   <img width="2559" height="875" alt="Screenshot 2026-03-26 at 17 48 37" 
src="https://github.com/user-attachments/assets/28b5a8ab-b9c9-4dac-8a31-3618c2c45d7c";
 />
   
   everything works as expected: fetching, scrolling, etc.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to