Skip to content

Commit

Permalink
feat: Add code owner tracking to celery tasks.
Browse files Browse the repository at this point in the history
This adds the decorator for ensuring celery tasks
get assigned the proper code owner on the LMS.
  • Loading branch information
dianakhuang committed Oct 10, 2023
1 parent 12cfd25 commit 7f69c97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openassessment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Initialization Information for Open Assessment Module
"""

__version__ = '5.5.4'
__version__ = '5.5.5'
6 changes: 6 additions & 0 deletions openassessment/workflow/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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):
"""
Expand All @@ -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):
"""
Expand All @@ -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):
"""
Expand Down

0 comments on commit 7f69c97

Please sign in to comment.