build: Add missing Celery task decorators, and add CI check for it (#33154)

This commit is contained in:
Tim McCormack
2023-09-15 16:03:04 -04:00
committed by GitHub
parent 3db436be0a
commit 25b18e83cd
8 changed files with 290 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import logging
from celery import shared_task
from celery_utils.logged_task import LoggedTask
from edx_django_utils.monitoring import set_code_owner_attribute
from .data import CLIPBOARD_PURPOSE
from .models import StagedContent
@@ -14,6 +15,7 @@ log = logging.getLogger(__name__)
@shared_task(base=LoggedTask)
@set_code_owner_attribute
def delete_expired_clipboards(staged_content_ids: list[int]):
"""
A Celery task to delete StagedContent clipboard entries that are no longer