ferruzzi commented on code in PR #46950:
URL: https://github.com/apache/airflow/pull/46950#discussion_r1968426262


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/glue.py:
##########
@@ -245,6 +246,9 @@ def display_logs_from(log_group: str, continuation_token: 
str | None) -> str | N
                 for response in paginator.paginate(
                     logGroupName=log_group,
                     logStreamNames=[run_id],
+                    startTime=int(
+                        (datetime.now() - timedelta(hours=24)).timestamp() * 
1000
+                    ),  # 24 hours ago in milliseconds

Review Comment:
   In the other thread you mentioned hardcoding the start time of the task.  
Sorry I didn't get back to you sooner.   That sounds like a good plan to me.   
If that isn't possible, I guess this works.  You have the job_name and run_id, 
I suspect you can get it from those, something like
   
   `glue_hook.conn.get_job_run(job_name, run_id)['JobRun']['StartedOn']`
   
   ((docs 
[here](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue/client/get_job_run.html)))



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