From f2187b67174723e7a0312ae0eb8a82ca72a1036e Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Wed, 26 Mar 2025 10:43:20 +0500 Subject: [PATCH] reseting file sizes task removed --- src/apps/analytics/tasks.py | 22 ---------------------- src/settings/base.py | 4 ---- 2 files changed, 26 deletions(-) diff --git a/src/apps/analytics/tasks.py b/src/apps/analytics/tasks.py index d07fbc313..96bf502cf 100644 --- a/src/apps/analytics/tasks.py +++ b/src/apps/analytics/tasks.py @@ -585,28 +585,6 @@ def update_home_page_counters(): ) -@app.task(queue="site-worker") # 12 hours -def reset_computed_storage_analytics(): - logger.info("Task reset_computed_storage_analytics started") - starting_time = time.process_time() - - # Reset the value of all computed file sizes so they will be re-computed again without any shifting on the next run of the storage analytics task - Submission.objects.all().update( - prediction_result_file_size=None, - scoring_result_file_size=None, - detailed_result_file_size=None, - ) - SubmissionDetails.objects.all().update(file_size=None) - Data.objects.all().update(file_size=None) - - elapsed_time = time.process_time() - starting_time - logger.info( - "Task reset_computed_storage_analytics stoped. Duration = {:.3f} seconds".format( - elapsed_time - ) - ) - - @app.task(queue="site-worker") def delete_orphan_files(): logger.info("Task delete_orphan_files started") diff --git a/src/settings/base.py b/src/settings/base.py index 7fc4ab41b..50d1616e2 100644 --- a/src/settings/base.py +++ b/src/settings/base.py @@ -240,10 +240,6 @@ 'task': 'profiles.tasks.clean_deleted_users', 'schedule': timedelta(days=1), # Run every 24 hours }, - 'reset_computed_storage_analytics': { - 'task': 'analytics.tasks.reset_computed_storage_analytics', - 'schedule': crontab(hour='2', minute='0', day_of_month='1', month_of_year="*/3") # Every 3 month at 02:00 UTC on the 1st - }, } CELERY_TIMEZONE = 'UTC' CELERY_WORKER_PREFETCH_MULTIPLIER = 1