Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/apps/analytics/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 0 additions & 4 deletions src/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down