Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: try calling set_code_owner inside task #2084

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6'
__version__ = '5.5.7'
10 changes: 5 additions & 5 deletions openassessment/workflow/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from celery import shared_task

from edx_django_utils.monitoring import set_code_owner_attribute
from edx_django_utils.monitoring import set_code_owner_attribute_from_module


@shared_task(bind=True,
Expand All @@ -14,11 +14,11 @@
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
"""
set_code_owner_attribute_from_module(__name__)

Check warning on line 21 in openassessment/workflow/tasks.py

View check run for this annotation

Codecov / codecov/patch

openassessment/workflow/tasks.py#L21

Added line #L21 was not covered by tests
from openassessment.workflow.workflow_batch_update_api import update_workflows_for_all_blocked_submissions
return update_workflows_for_all_blocked_submissions()

Expand All @@ -30,12 +30,12 @@
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):
"""
Async task wrapper
"""
set_code_owner_attribute_from_module(__name__)

Check warning on line 38 in openassessment/workflow/tasks.py

View check run for this annotation

Codecov / codecov/patch

openassessment/workflow/tasks.py#L38

Added line #L38 was not covered by tests
from openassessment.workflow.workflow_batch_update_api import update_workflows_for_course
return update_workflows_for_course(course_id, workflow_update_data_for_course)

Expand All @@ -47,12 +47,12 @@
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):
"""
Async task wrapper
"""
set_code_owner_attribute_from_module(__name__)

Check warning on line 55 in openassessment/workflow/tasks.py

View check run for this annotation

Codecov / codecov/patch

openassessment/workflow/tasks.py#L55

Added line #L55 was not covered by tests
from openassessment.workflow.workflow_batch_update_api import update_workflows_for_ora_block
return update_workflows_for_ora_block(item_id, workflow_update_data_for_ora, course_settings)

Expand All @@ -64,11 +64,11 @@
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):
"""
Async task wrapper
"""
set_code_owner_attribute_from_module(__name__)

Check warning on line 72 in openassessment/workflow/tasks.py

View check run for this annotation

Codecov / codecov/patch

openassessment/workflow/tasks.py#L72

Added line #L72 was not covered by tests
from openassessment.workflow.workflow_batch_update_api import update_workflow_for_submission
return update_workflow_for_submission(submission_uuid, assessment_requirements, course_settings)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edx-ora2",
"version": "5.5.6",
"version": "5.5.7",
"repository": "https://github.com/openedx/edx-ora2.git",
"dependencies": {
"@edx/frontend-build": "^6.1.1",
Expand Down
Loading