ephraimbuddy commented on a change in pull request #7791: Add ability to 
specify a maximum modified time for objects in GCSToGCSOperator
URL: https://github.com/apache/airflow/pull/7791#discussion_r395973205
 
 

 ##########
 File path: airflow/providers/google/cloud/operators/gcs_to_gcs.py
 ##########
 @@ -277,14 +283,35 @@ def _copy_source_with_wildcard(self, hook, prefix):
                                      destination_object=destination_object)
 
     def _copy_single_object(self, hook, source_object, destination_object):
-        if self.last_modified_time is not None:
+        if self.last_modified_time and self.maximum_modified_time:
+            # check to see if object was modified between last_modified_time 
and
+            # maximum_modified_time
+            if hook.is_updated_between(self.source_bucket,
+                                       source_object,
+                                       self.last_modified_time,
+                                       self.maximum_modified_time
+                                       ):
+                self.log.debug("Object has been modified between %s and %s",
 
 Review comment:
   Ok. I'll do that

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


With regards,
Apache Git Services

Reply via email to