fix: Add missing code-owner decorators for Celery (#33172)

This commit is contained in:
Tim McCormack
2023-09-05 11:16:14 -04:00
committed by GitHub
parent b94545cc35
commit f39b01c4b1
2 changed files with 4 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ Contain celery tasks
"""
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
@@ -14,6 +15,7 @@ User = get_user_model()
@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

View File

@@ -6,9 +6,11 @@ Django Celery tasks for service status app
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.