Loading src/jama/__init__.py +1 −1 Original line number Diff line number Diff line __version__ = "0.1.61" __version__ = "0.1.63" src/resources/tasks.py +17 −18 Original line number Diff line number Diff line Loading @@ -226,7 +226,6 @@ def update_data_from_xlsx_rows( project = None # Try to find the project if len(xlsx_rows) > 0: for r in xlsx_rows: if r.get("resource_pk"): first_resource = models.Resource.objects.filter( Loading Loading @@ -337,7 +336,7 @@ def denorm_sizes(): logger.warning(f"can't decompress {file.pk}") @db_periodic_task(crontab(day="*/7")) # @db_periodic_task(crontab(day="*/7")) def check_files_integrity(): def file_hash256(file_path: str) -> str: try: Loading @@ -356,7 +355,7 @@ def check_files_integrity(): for row in cursor.fetchall(): new_hash = file_hash256(models.hash_to_local_path(row[0])) if new_hash != row[0]: logger.warning(f"FILE INTEGRITY CHECK FAILED. File id: {row[1]}") logger.warning(f"FILE INTEGRITY CHECK FAILED. File hash: {row[0]}") models.File.objects.filter(hash=row[0]).update( integrity_check_failed_at=timezone.now() ) Loading Loading
src/jama/__init__.py +1 −1 Original line number Diff line number Diff line __version__ = "0.1.61" __version__ = "0.1.63"
src/resources/tasks.py +17 −18 Original line number Diff line number Diff line Loading @@ -226,7 +226,6 @@ def update_data_from_xlsx_rows( project = None # Try to find the project if len(xlsx_rows) > 0: for r in xlsx_rows: if r.get("resource_pk"): first_resource = models.Resource.objects.filter( Loading Loading @@ -337,7 +336,7 @@ def denorm_sizes(): logger.warning(f"can't decompress {file.pk}") @db_periodic_task(crontab(day="*/7")) # @db_periodic_task(crontab(day="*/7")) def check_files_integrity(): def file_hash256(file_path: str) -> str: try: Loading @@ -356,7 +355,7 @@ def check_files_integrity(): for row in cursor.fetchall(): new_hash = file_hash256(models.hash_to_local_path(row[0])) if new_hash != row[0]: logger.warning(f"FILE INTEGRITY CHECK FAILED. File id: {row[1]}") logger.warning(f"FILE INTEGRITY CHECK FAILED. File hash: {row[0]}") models.File.objects.filter(hash=row[0]).update( integrity_check_failed_at=timezone.now() ) Loading