Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
16acfef8
Commit
16acfef8
authored
May 08, 2017
by
J. Cliff Dyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add single retry to compute_grades tasks.
parent
5beae9d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lms/djangoapps/grades/tasks.py
+6
-3
No files found.
lms/djangoapps/grades/tasks.py
View file @
16acfef8
...
@@ -54,8 +54,8 @@ class _BaseTask(PersistOnFailureTask, LoggedTask): # pylint: disable=abstract-m
...
@@ -54,8 +54,8 @@ class _BaseTask(PersistOnFailureTask, LoggedTask): # pylint: disable=abstract-m
abstract
=
True
abstract
=
True
@task
(
base
=
_BaseTask
)
@task
(
base
=
_BaseTask
,
bind
=
True
,
default_retry_delay
=
30
,
max_retries
=
1
)
def
compute_grades_for_course_v2
(
**
kwargs
):
def
compute_grades_for_course_v2
(
self
,
**
kwargs
):
"""
"""
Compute grades for a set of students in the specified course.
Compute grades for a set of students in the specified course.
...
@@ -80,7 +80,10 @@ def compute_grades_for_course_v2(**kwargs):
...
@@ -80,7 +80,10 @@ def compute_grades_for_course_v2(**kwargs):
estimate_first_attempted
=
kwargs
.
pop
(
'estimate_first_attempted'
,
False
)
estimate_first_attempted
=
kwargs
.
pop
(
'estimate_first_attempted'
,
False
)
if
estimate_first_attempted
:
if
estimate_first_attempted
:
waffle
()
.
override_for_request
(
ESTIMATE_FIRST_ATTEMPTED
,
True
)
waffle
()
.
override_for_request
(
ESTIMATE_FIRST_ATTEMPTED
,
True
)
return
compute_grades_for_course
(
course_key
,
offset
,
batch_size
)
try
:
return
compute_grades_for_course
(
course_key
,
offset
,
batch_size
)
except
Exception
as
exc
:
# pylint: disable=broad-except
raise
self
.
retry
(
kwargs
=
kwargs
,
exc
=
exc
)
@task
(
base
=
_BaseTask
)
@task
(
base
=
_BaseTask
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment