Skip to content
Snippets Groups Projects
Unverified Commit 9616a1c3 authored by Manjinder Singh's avatar Manjinder Singh Committed by GitHub
Browse files

fix: adding code owner info to celery tasks (#28040)

Celery tasks needs decorator to correctly add ownership info:
https://github.com/edx/edx-django-utils/blob/master/edx_django_utils/monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst#handling-celery-tasks
parent ed950c4c
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ from django.core.exceptions import ObjectDoesNotExist
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import UsageKey
from xblock.completable import XBlockCompletionMode
from edx_django_utils.monitoring import set_code_owner_attribute
from common.djangoapps.student.models import get_user_by_username_or_email
from lms.djangoapps.courseware.model_data import FieldDataCache
......@@ -20,6 +21,7 @@ log = logging.getLogger(__name__)
@shared_task(base=LoggedTask, ignore_result=True)
@set_code_owner_attribute
def complete_student_attempt_task(user_identifier: str, content_id: str) -> None:
"""
Marks all completable children of content_id as complete for the user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment