Skip to content

Commit

Permalink
fix: Add missing code-owner decorators for Celery (#33172)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmc-edx authored Sep 5, 2023
1 parent b94545c commit f39b01c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lms/djangoapps/discussion/rest_api/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from celery import shared_task
from django.contrib.auth import get_user_model
from edx_django_utils.monitoring import set_code_owner_attribute
from opaque_keys.edx.locator import CourseKey
from lms.djangoapps.courseware.courses import get_course_with_access
from openedx.core.djangoapps.django_comment_common.comment_client.thread import Thread
Expand All @@ -14,6 +15,7 @@


@shared_task
@set_code_owner_attribute
def send_thread_created_notification(thread_id, course_key_str, user_id):
"""
Send notification when a new thread is created
Expand Down
2 changes: 2 additions & 0 deletions openedx/core/djangoapps/service_status/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
import time

from celery import current_app as celery
from edx_django_utils.monitoring import set_code_owner_attribute


@celery.task
@set_code_owner_attribute
def delayed_ping(value, delay):
"""A simple tasks that replies to a message after a especified amount
of seconds.
Expand Down

0 comments on commit f39b01c

Please sign in to comment.