diff --git a/backend/data_export/celery_tasks.py b/backend/data_export/celery_tasks.py index d5f0b8cc..3b9cfcc7 100644 --- a/backend/data_export/celery_tasks.py +++ b/backend/data_export/celery_tasks.py @@ -55,7 +55,7 @@ def create_individual_dataset(project: Project, dirpath: str, confirmed_only: bo service.export(filepath) -@shared_task +@shared_task(autoretry_for=(Exception,), retry_backoff=True, retry_jitter=True) def export_dataset(project_id, file_format: str, confirmed_only=False): project = get_object_or_404(Project, pk=project_id) dirpath = os.path.join(settings.MEDIA_ROOT, str(uuid.uuid4())) diff --git a/backend/data_import/celery_tasks.py b/backend/data_import/celery_tasks.py index c51b7557..2fe09156 100644 --- a/backend/data_import/celery_tasks.py +++ b/backend/data_import/celery_tasks.py @@ -46,7 +46,7 @@ def check_uploaded_files(upload_ids: List[str], file_format: Format): return cleaned_ids, errors -@shared_task +@shared_task(autoretry_for=(Exception,), retry_backoff=True, retry_jitter=True) def import_dataset(user_id, project_id, file_format: str, upload_ids: List[str], task: str, **kwargs): project = get_object_or_404(Project, pk=project_id) user = get_object_or_404(get_user_model(), pk=user_id)