You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/13 11:26:32 UTC

[GitHub] [airflow] BasPH commented on a change in pull request #8266: Fix non updating DAG code by checking against last modification time

BasPH commented on a change in pull request #8266: Fix non updating DAG code by checking against last modification time
URL: https://github.com/apache/airflow/pull/8266#discussion_r407435793
 
 

 ##########
 File path: airflow/models/dagcode.py
 ##########
 @@ -124,15 +124,14 @@ def bulk_sync_to_db(cls, filelocs: Iterable[str], session=None):
             session.add(orm_dag_code)
 
         for fileloc in existing_filelocs:
-            old_version = existing_orm_dag_codes_by_fileloc_hashes[
-                filelocs_to_hashes[fileloc]
-            ]
-            file_modified = datetime.fromtimestamp(
-                os.path.getmtime(correct_maybe_zipped(fileloc)), tz=timezone.utc)
+            current_version = existing_orm_dag_codes_by_fileloc_hashes[filelocs_to_hashes[fileloc]]
+            file_mod_time = datetime.fromtimestamp(
+                os.path.getmtime(correct_maybe_zipped(fileloc)), tz=timezone.utc
+            )
 
-            if (file_modified - timedelta(seconds=120)) > old_version.last_updated:
 
 Review comment:
   Whoops, fixed

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services