Skip to content

Commit

Permalink
fix: add retry in dump_data_to_clickhouse task
Browse files Browse the repository at this point in the history
  • Loading branch information
Ang-m4 committed Feb 6, 2025
1 parent 703f5e8 commit a7af9aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion platform_plugin_aspects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from importlib import import_module

from celery import shared_task
from django.core.exceptions import ObjectDoesNotExist
from edx_django_utils.monitoring import set_code_owner_attribute
from opaque_keys.edx.keys import CourseKey

Expand Down Expand Up @@ -40,7 +41,11 @@ def dump_course_to_clickhouse(course_key_string, connection_overrides=None):
sink.dump(ccx_course_key)


@shared_task
@shared_task(
autoretry_for=(ObjectDoesNotExist,),
retry_backoff=True,
retry_backoff_max=32,
)
@set_code_owner_attribute
def dump_data_to_clickhouse(
sink_module, sink_name, object_id, connection_overrides=None
Expand Down

0 comments on commit a7af9aa

Please sign in to comment.