disable celery task meta cleanup

This commit is contained in:
bohanjason 2020-03-29 17:15:49 -04:00 committed by Dana Van Aken
parent 593c4acb1d
commit adfee76977
2 changed files with 5 additions and 1 deletions

View File

@ -221,6 +221,9 @@ CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
# The celerybeat scheduler class # The celerybeat scheduler class
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler' CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
# Celery task meta will not be deleted
CELERY_TASK_RESULT_EXPIRES = None
# Defines the periodic task schedule for celerybeat # Defines the periodic task schedule for celerybeat
CELERYBEAT_SCHEDULE = { CELERYBEAT_SCHEDULE = {
'run-every-5m': { 'run-every-5m': {

View File

@ -411,7 +411,8 @@ def result_view(request, project_id, session_id, result_id):
next_conf_available = False next_conf_available = False
else: else:
task_tuple = JSONUtil.loads(target.task_ids) task_tuple = JSONUtil.loads(target.task_ids)
task_ids = TaskUtil.get_task_ids_from_tuple(task_tuple) # For now we ignore the first subtask (i.e., preprocessing) status in GPR/DNN.
task_ids = TaskUtil.get_task_ids_from_tuple(task_tuple)[-3:]
tasks = TaskUtil.get_tasks(task_ids) tasks = TaskUtil.get_tasks(task_ids)
status, _ = TaskUtil.get_task_status(tasks, len(task_ids)) status, _ = TaskUtil.get_task_status(tasks, len(task_ids))