From f57f5f710383f7a3aa3f5103f10bd5da15d6f53b Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 10 Oct 2023 12:23:18 -0400 Subject: [PATCH] feat: Add code owner tracking to celery tasks. This adds the decorator for ensuring celery tasks get assigned the proper code owner on the LMS. --- openassessment/__init__.py | 2 +- openassessment/workflow/tasks.py | 6 ++++++ package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openassessment/__init__.py b/openassessment/__init__.py index 903c987d45..84d24f5801 100644 --- a/openassessment/__init__.py +++ b/openassessment/__init__.py @@ -2,4 +2,4 @@ Initialization Information for Open Assessment Module """ -__version__ = '5.5.4' +__version__ = '5.5.5' diff --git a/openassessment/workflow/tasks.py b/openassessment/workflow/tasks.py index 426d0d4d33..4e0bd851e8 100644 --- a/openassessment/workflow/tasks.py +++ b/openassessment/workflow/tasks.py @@ -4,6 +4,8 @@ from celery import shared_task +from edx_django_utils.monitoring import set_code_owner_attribute + @shared_task(bind=True, acks_late=True, @@ -12,6 +14,7 @@ retry_backoff=True, retry_backoff_max=500, retry_jitter=True) +@set_code_owner_attribute def update_workflows_for_all_blocked_submissions_task(self): # pylint: disable=unused-argument """ Async task wrapper @@ -27,6 +30,7 @@ def update_workflows_for_all_blocked_submissions_task(self): # pylint: disable= retry_backoff=True, retry_backoff_max=500, retry_jitter=True) +@set_code_owner_attribute # pylint: disable=unused-argument def update_workflows_for_course_task(self, course_id, workflow_update_data_for_course=None): """ @@ -43,6 +47,7 @@ def update_workflows_for_course_task(self, course_id, workflow_update_data_for_c retry_backoff=True, retry_backoff_max=500, retry_jitter=True) +@set_code_owner_attribute # pylint: disable=unused-argument def update_workflows_for_ora_block_task(self, item_id, workflow_update_data_for_ora=None, course_settings=None): """ @@ -59,6 +64,7 @@ def update_workflows_for_ora_block_task(self, item_id, workflow_update_data_for_ retry_backoff=True, retry_backoff_max=300, retry_jitter=True) +@set_code_owner_attribute # pylint: disable=unused-argument def update_workflow_for_submission_task(self, submission_uuid, assessment_requirements=None, course_settings=None): """ diff --git a/package.json b/package.json index 298989a616..d13ae3160c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "edx-ora2", - "version": "5.5.4", + "version": "5.5.5", "repository": "https://github.com/openedx/edx-ora2.git", "dependencies": { "@edx/frontend-build": "^6.1.1",