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
92591565
Commit
92591565
authored
Dec 20, 2016
by
J. Cliff Dyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review response.
parent
9d545eca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
openedx/core/djangoapps/content/block_structure/tasks.py
+7
-6
No files found.
openedx/core/djangoapps/content/block_structure/tasks.py
View file @
92591565
...
...
@@ -2,14 +2,16 @@
Asynchronous tasks related to the Course Blocks sub-application.
"""
import
logging
from
capa.responsetypes
import
LoncapaProblemError
from
celery.task
import
task
from
django.conf
import
settings
from
edxval.api
import
ValInternalError
from
lxml.etree
import
XMLSyntaxError
from
edxval.api
import
ValInternalError
from
opaque_keys.edx.keys
import
CourseKey
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
openedx.core.djangoapps.content.block_structure
import
api
log
=
logging
.
getLogger
(
'edx.celery.task'
)
...
...
@@ -31,14 +33,13 @@ def update_course_in_cache(course_id):
course_key
=
CourseKey
.
from_string
(
course_id
)
api
.
update_course_in_cache
(
course_key
)
except
NO_RETRY_TASKS
as
exc
:
log
.
info
(
"update_course_in_cache encountered unrecoverable error: {}"
.
format
(
exc
))
# Known unrecoverable errors
raise
except
RETRY_TASKS
as
exc
:
log
.
info
(
"update_course_in_cache encounted expected error, retrying."
)
log
.
exception
(
"update_course_in_cache encounted expected error, retrying."
)
raise
update_course_in_cache
.
retry
(
args
=
[
course_id
],
exc
=
exc
)
except
Exception
as
exc
:
# pylint: disable=broad-except
log
.
info
(
"update_course_in_cache encounted unknown error. Retry #{}, Exception:
{}"
.
format
(
log
.
exception
(
"update_course_in_cache encounted unknown error. Retry #
{}"
.
format
(
update_course_in_cache
.
request
.
retries
,
repr
(
exc
)
))
raise
update_course_in_cache
.
retry
(
args
=
[
course_id
],
exc
=
exc
)
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